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_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 Loading... |
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 Loading... |
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_ |
OLD | NEW |