OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "net/cert/ct_objects_extractor.h" | 5 #include "net/cert/ct_objects_extractor.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <openssl/bytestring.h> | 9 #include <openssl/bytestring.h> |
10 #include <openssl/obj.h> | 10 #include <openssl/obj.h> |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 namespace ct { | 24 namespace ct { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 void FreeX509_EXTENSIONS(X509_EXTENSIONS* ptr) { | 28 void FreeX509_EXTENSIONS(X509_EXTENSIONS* ptr) { |
29 sk_X509_EXTENSION_pop_free(ptr, X509_EXTENSION_free); | 29 sk_X509_EXTENSION_pop_free(ptr, X509_EXTENSION_free); |
30 } | 30 } |
31 | 31 |
32 typedef crypto::ScopedOpenSSL<X509_EXTENSIONS, FreeX509_EXTENSIONS>::Type | 32 using ScopedX509_EXTENSIONS = |
33 ScopedX509_EXTENSIONS; | 33 crypto::ScopedOpenSSL<X509_EXTENSIONS, FreeX509_EXTENSIONS>; |
34 | 34 |
35 // The wire form of the OID 1.3.6.1.4.1.11129.2.4.2. See Section 3.3 of | 35 // The wire form of the OID 1.3.6.1.4.1.11129.2.4.2. See Section 3.3 of |
36 // RFC6962. | 36 // RFC6962. |
37 const uint8_t kEmbeddedSCTOid[] = {0x2B, 0x06, 0x01, 0x04, 0x01, 0xD6, 0x79, | 37 const uint8_t kEmbeddedSCTOid[] = {0x2B, 0x06, 0x01, 0x04, 0x01, 0xD6, 0x79, |
38 0x02, 0x04, 0x02}; | 38 0x02, 0x04, 0x02}; |
39 | 39 |
40 // The wire form of the OID 1.3.6.1.4.1.11129.2.4.5 - OCSP SingleExtension for | 40 // The wire form of the OID 1.3.6.1.4.1.11129.2.4.5 - OCSP SingleExtension for |
41 // X.509v3 Certificate Transparency Signed Certificate Timestamp List, see | 41 // X.509v3 Certificate Transparency Signed Certificate Timestamp List, see |
42 // Section 3.3 of RFC6962. | 42 // Section 3.3 of RFC6962. |
43 const uint8_t kOCSPExtensionOid[] = {0x2B, 0x06, 0x01, 0x04, 0x01, 0xD6, 0x79, | 43 const uint8_t kOCSPExtensionOid[] = {0x2B, 0x06, 0x01, 0x04, 0x01, 0xD6, 0x79, |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 if (!x509_exts || ptr != CBS_data(&extensions) + CBS_len(&extensions)) | 354 if (!x509_exts || ptr != CBS_data(&extensions) + CBS_len(&extensions)) |
355 return false; | 355 return false; |
356 | 356 |
357 return GetSCTListFromX509_EXTENSIONS( | 357 return GetSCTListFromX509_EXTENSIONS( |
358 x509_exts.get(), kOCSPExtensionOid, sizeof(kOCSPExtensionOid), sct_list); | 358 x509_exts.get(), kOCSPExtensionOid, sizeof(kOCSPExtensionOid), sct_list); |
359 } | 359 } |
360 | 360 |
361 } // namespace ct | 361 } // namespace ct |
362 | 362 |
363 } // namespace net | 363 } // namespace net |
OLD | NEW |