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

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

Issue 230713002: Certificate Transparency: Parse Signed Tree Heads and validate them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing more of Ryan's comments Created 6 years, 7 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/ct_serialization_unittest.cc ('k') | net/cert/signed_certificate_timestamp.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 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_SIGNED_CERTIFICATE_TIMESTAMP_H_ 5 #ifndef NET_CERT_SIGNED_CERTIFICATE_TIMESTAMP_H_
6 #define NET_CERT_SIGNED_CERTIFICATE_TIMESTAMP_H_ 6 #define NET_CERT_SIGNED_CERTIFICATE_TIMESTAMP_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 enum SignatureAlgorithm { 59 enum SignatureAlgorithm {
60 SIG_ALGO_ANONYMOUS = 0, 60 SIG_ALGO_ANONYMOUS = 0,
61 SIG_ALGO_RSA = 1, 61 SIG_ALGO_RSA = 1,
62 SIG_ALGO_DSA = 2, 62 SIG_ALGO_DSA = 2,
63 SIG_ALGO_ECDSA = 3 63 SIG_ALGO_ECDSA = 3
64 }; 64 };
65 65
66 DigitallySigned(); 66 DigitallySigned();
67 ~DigitallySigned(); 67 ~DigitallySigned();
68 68
69 // Returns true if |other_hash_algorithm| and |other_signature_algorithm|
70 // match this DigitallySigned hash and signature algorithms.
71 bool SignatureParametersMatch(
72 HashAlgorithm other_hash_algorithm,
73 SignatureAlgorithm other_signature_algorithm) const;
74
69 HashAlgorithm hash_algorithm; 75 HashAlgorithm hash_algorithm;
70 SignatureAlgorithm signature_algorithm; 76 SignatureAlgorithm signature_algorithm;
71 // 'signature' field. 77 // 'signature' field.
72 std::string signature_data; 78 std::string signature_data;
73 }; 79 };
74 80
75 // SignedCertificateTimestamp struct in RFC 6962, Section 3.2. 81 // SignedCertificateTimestamp struct in RFC 6962, Section 3.2.
76 struct NET_EXPORT SignedCertificateTimestamp 82 struct NET_EXPORT SignedCertificateTimestamp
77 : public base::RefCountedThreadSafe<SignedCertificateTimestamp> { 83 : public base::RefCountedThreadSafe<SignedCertificateTimestamp> {
78 // Predicate functor used in maps when SignedCertificateTimestamp is used as 84 // Predicate functor used in maps when SignedCertificateTimestamp is used as
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 ~SignedCertificateTimestamp(); 129 ~SignedCertificateTimestamp();
124 130
125 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestamp); 131 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestamp);
126 }; 132 };
127 133
128 } // namespace ct 134 } // namespace ct
129 135
130 } // namespace net 136 } // namespace net
131 137
132 #endif // NET_CERT_SIGNED_CERTIFICATE_TIMESTAMP_H_ 138 #endif // NET_CERT_SIGNED_CERTIFICATE_TIMESTAMP_H_
OLDNEW
« no previous file with comments | « net/cert/ct_serialization_unittest.cc ('k') | net/cert/signed_certificate_timestamp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698