| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 // Version enum in RFC 6962, Section 3.2. | 82 // Version enum in RFC 6962, Section 3.2. |
| 83 enum Version { | 83 enum Version { |
| 84 SCT_VERSION_1 = 0, | 84 SCT_VERSION_1 = 0, |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // Source of the SCT - supplementary, not defined in CT RFC. | 87 // Source of the SCT - supplementary, not defined in CT RFC. |
| 88 enum Origin { | 88 enum Origin { |
| 89 SCT_EMBEDDED = 0, | 89 SCT_EMBEDDED = 0, |
| 90 SCT_FROM_TLS_HANDSHAKE = 1, | 90 SCT_FROM_TLS_EXTENSION = 1, |
| 91 SCT_FROM_OCSP_RESPONSE = 2, | 91 SCT_FROM_OCSP_RESPONSE = 2, |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 SignedCertificateTimestamp(); | 94 SignedCertificateTimestamp(); |
| 95 | 95 |
| 96 Version version; | 96 Version version; |
| 97 std::string log_id; | 97 std::string log_id; |
| 98 base::Time timestamp; | 98 base::Time timestamp; |
| 99 std::string extensions; | 99 std::string extensions; |
| 100 DigitallySigned signature; | 100 DigitallySigned signature; |
| 101 // The origin should not participate in equality checks | 101 // The origin should not participate in equality checks |
| 102 // as the same SCT can be provided from multiple sources. | 102 // as the same SCT can be provided from multiple sources. |
| 103 Origin origin; | 103 Origin origin; |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 friend class base::RefCountedThreadSafe<SignedCertificateTimestamp>; | 106 friend class base::RefCountedThreadSafe<SignedCertificateTimestamp>; |
| 107 | 107 |
| 108 ~SignedCertificateTimestamp(); | 108 ~SignedCertificateTimestamp(); |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestamp); | 110 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestamp); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace ct | 113 } // namespace ct |
| 114 | 114 |
| 115 } // namespace net | 115 } // namespace net |
| 116 | 116 |
| 117 #endif // NET_CERT_SIGNED_CERTIFICATE_TIMESTAMP_H_ | 117 #endif // NET_CERT_SIGNED_CERTIFICATE_TIMESTAMP_H_ |
| OLD | NEW |