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

Side by Side Diff: net/cert/ct_objects_extractor.h

Issue 27026002: CT: Adding preliminary Certificate Transparency support to Chromium. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Distinguish between SCTs from unknown logs and unverified ones Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/cert/ct_log_verifier_unittest.cc ('k') | net/cert/ct_objects_extractor_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_CERT_CT_OBJECTS_EXTRACTOR_H_
6 #define NET_CERT_CT_OBJECTS_EXTRACTOR_H_
7
8 #include <string>
9
10 #include "net/base/net_export.h"
11 #include "net/cert/x509_certificate.h"
12
13 namespace net {
14
15 namespace ct {
16
17 struct LogEntry;
18
19 // Extracts a SignedCertificateTimestampList that has been embedded within a
20 // leaf cert as an X.509v3 extension with the OID 1.3.6.1.4.1.11129.2.4.2.
21 // If the extension is present, returns true, updating |*sct_list| to contain
22 // the encoded list, minus the DER encoding necessary for the extension.
23 // |*sct_list| can then be further decoded with ct::DecodeSCTList
24 NET_EXPORT_PRIVATE bool ExtractEmbeddedSCTs(X509Certificate::OSCertHandle cert,
25 std::string* sct_list);
26
27 // Obtains a PrecertChain log entry for |leaf|, an X.509v3 certificate that
28 // contains an X.509v3 extension with the OID 1.3.6.1.4.1.11129.2.4.2. On
29 // success, fills |*result| with the data for a PrecertChain log entry and
30 // returns true.
31 // The filled |*result| should be verified using ct::CTLogVerifier::VerifySCT
32 // Note: If |leaf| does not contain the required extension, it is treated as
33 // a failure.
34 NET_EXPORT_PRIVATE bool GetPrecertLogEntry(X509Certificate::OSCertHandle leaf,
35 X509Certificate::OSCertHandle issuer,
36 LogEntry* result);
37
38 // Obtains an X509Chain log entry for |leaf|, an X.509v3 certificate that
39 // contains an X.509v3 extension with the OID 1.3.6.1.4.1.11129.2.4.2. On
40 // success, fills |result| with the data for an X509Chain log entry and
41 // returns true.
42 // This function should be called when the SCT for the certificate was not
43 // embedded in it.
44 // The filled |*result| should be verified using ct::CTLogVerifier::VerifySCT
45 NET_EXPORT_PRIVATE bool GetAsn1CertLogEntry(
46 X509Certificate::OSCertHandle leaf_cert,
47 LogEntry* result);
48
49 } // namespace ct
50
51 } // namespace net
52
53 #endif // NET_CERT_CT_OBJECTS_EXTRACTOR_H_
OLDNEW
« no previous file with comments | « net/cert/ct_log_verifier_unittest.cc ('k') | net/cert/ct_objects_extractor_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698