Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Side by Side Diff: net/cert/internal/parse_certificate_fuzzer.cc

Issue 2353333003: Rename CreateFromDer() to Create(). (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/cert/internal/parse_certificate.h ('k') | net/cert/internal/parsed_certificate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/cert/internal/cert_errors.h" 9 #include "net/cert/internal/cert_errors.h"
10 #include "net/cert/internal/certificate_policies.h" 10 #include "net/cert/internal/certificate_policies.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 der::BitString key_usage; 54 der::BitString key_usage;
55 std::vector<der::Input> policies; 55 std::vector<der::Input> policies;
56 std::vector<der::Input> eku_oids; 56 std::vector<der::Input> eku_oids;
57 std::vector<base::StringPiece> ca_issuers_uris; 57 std::vector<base::StringPiece> ca_issuers_uris;
58 std::vector<base::StringPiece> ocsp_uris; 58 std::vector<base::StringPiece> ocsp_uris;
59 if (FindExtension(BasicConstraintsOid(), &extensions, &extension)) 59 if (FindExtension(BasicConstraintsOid(), &extensions, &extension))
60 ignore_result(ParseBasicConstraints(extension.value, &basic_constraints)); 60 ignore_result(ParseBasicConstraints(extension.value, &basic_constraints));
61 if (FindExtension(KeyUsageOid(), &extensions, &extension)) 61 if (FindExtension(KeyUsageOid(), &extensions, &extension))
62 ignore_result(ParseKeyUsage(extension.value, &key_usage)); 62 ignore_result(ParseKeyUsage(extension.value, &key_usage));
63 if (FindExtension(SubjectAltNameOid(), &extensions, &extension)) 63 if (FindExtension(SubjectAltNameOid(), &extensions, &extension))
64 GeneralNames::CreateFromDer(extension.value); 64 GeneralNames::Create(extension.value);
65 if (FindExtension(CertificatePoliciesOid(), &extensions, &extension)) 65 if (FindExtension(CertificatePoliciesOid(), &extensions, &extension))
66 ParseCertificatePoliciesExtension(extension.value, &policies); 66 ParseCertificatePoliciesExtension(extension.value, &policies);
67 if (FindExtension(ExtKeyUsageOid(), &extensions, &extension)) 67 if (FindExtension(ExtKeyUsageOid(), &extensions, &extension))
68 ParseEKUExtension(extension.value, &eku_oids); 68 ParseEKUExtension(extension.value, &eku_oids);
69 if (FindExtension(AuthorityInfoAccessOid(), &extensions, &extension)) 69 if (FindExtension(AuthorityInfoAccessOid(), &extensions, &extension))
70 ignore_result(ParseAuthorityInfoAccess(extension.value, &ca_issuers_uris, 70 ignore_result(ParseAuthorityInfoAccess(extension.value, &ca_issuers_uris,
71 &ocsp_uris)); 71 &ocsp_uris));
72 } 72 }
73 } 73 }
74 74
75 } // namespace 75 } // namespace
76 } // namespace net 76 } // namespace net
77 77
78 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 78 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
79 net::der::Input in(data, size); 79 net::der::Input in(data, size);
80 net::ParseCertificateForFuzzer(in); 80 net::ParseCertificateForFuzzer(in);
81 return 0; 81 return 0;
82 } 82 }
OLDNEW
« no previous file with comments | « net/cert/internal/parse_certificate.h ('k') | net/cert/internal/parsed_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698