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 #ifndef NET_CERT_CT_OBJECTS_EXTRACTOR_H_ | 5 #ifndef NET_CERT_CT_OBJECTS_EXTRACTOR_H_ |
6 #define NET_CERT_CT_OBJECTS_EXTRACTOR_H_ | 6 #define NET_CERT_CT_OBJECTS_EXTRACTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/strings/string_piece.h" |
10 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
11 #include "net/cert/x509_certificate.h" | 12 #include "net/cert/x509_certificate.h" |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 | 15 |
15 namespace ct { | 16 namespace ct { |
16 | 17 |
17 struct LogEntry; | 18 struct LogEntry; |
18 | 19 |
19 // Extracts a SignedCertificateTimestampList that has been embedded within a | 20 // Extracts a SignedCertificateTimestampList that has been embedded within a |
(...skipping 27 matching lines...) Expand all Loading... |
47 | 48 |
48 // Extracts a SignedCertificateTimestampList that has been embedded within | 49 // Extracts a SignedCertificateTimestampList that has been embedded within |
49 // an OCSP response as an extension with the OID 1.3.6.1.4.1.11129.2.4.5. | 50 // an OCSP response as an extension with the OID 1.3.6.1.4.1.11129.2.4.5. |
50 // If the extension is present, and the response matches the issuer and | 51 // If the extension is present, and the response matches the issuer and |
51 // serial number, returns true, updating |*sct_list| to contain | 52 // serial number, returns true, updating |*sct_list| to contain |
52 // the encoded list, minus the DER encoding necessary for the extension. | 53 // the encoded list, minus the DER encoding necessary for the extension. |
53 // |*sct_list| can then be further decoded with ct::DecodeSCTList. | 54 // |*sct_list| can then be further decoded with ct::DecodeSCTList. |
54 NET_EXPORT_PRIVATE bool ExtractSCTListFromOCSPResponse( | 55 NET_EXPORT_PRIVATE bool ExtractSCTListFromOCSPResponse( |
55 X509Certificate::OSCertHandle issuer, | 56 X509Certificate::OSCertHandle issuer, |
56 const std::string& cert_serial_number, | 57 const std::string& cert_serial_number, |
57 const std::string& ocsp_response, | 58 base::StringPiece ocsp_response, |
58 std::string* sct_list); | 59 std::string* sct_list); |
59 | 60 |
60 } // namespace ct | 61 } // namespace ct |
61 | 62 |
62 } // namespace net | 63 } // namespace net |
63 | 64 |
64 #endif // NET_CERT_CT_OBJECTS_EXTRACTOR_H_ | 65 #endif // NET_CERT_CT_OBJECTS_EXTRACTOR_H_ |
OLD | NEW |