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

Unified Diff: net/cert/ct_serialization.cc

Issue 1951233003: Consistent SignedCertificateTimestamp::Version and SignedTreeHead::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/ct_objects_extractor_unittest.cc ('k') | net/cert/signed_certificate_timestamp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_serialization.cc
diff --git a/net/cert/ct_serialization.cc b/net/cert/ct_serialization.cc
index 2de83087260f8828a81a44e65f719eeb5bd8ebe9..3e16ce31c9aec12ada3cfb0558a0247882c16631 100644
--- a/net/cert/ct_serialization.cc
+++ b/net/cert/ct_serialization.cc
@@ -339,7 +339,7 @@ bool EncodeV1SCTSignedData(const base::Time& timestamp,
const std::string& serialized_log_entry,
const std::string& extensions,
std::string* output) {
- WriteUint(kVersionLength, SignedCertificateTimestamp::SCT_VERSION_1,
+ WriteUint(kVersionLength, SignedCertificateTimestamp::V1,
output);
WriteUint(kSignatureTypeLength, SIGNATURE_TYPE_CERTIFICATE_TIMESTAMP,
output);
@@ -383,12 +383,12 @@ bool DecodeSignedCertificateTimestamp(
unsigned version;
if (!ReadUint(kVersionLength, input, &version))
return false;
- if (version != SignedCertificateTimestamp::SCT_VERSION_1) {
+ if (version != SignedCertificateTimestamp::V1) {
DVLOG(1) << "Unsupported/invalid version " << version;
return false;
}
- result->version = SignedCertificateTimestamp::SCT_VERSION_1;
+ result->version = SignedCertificateTimestamp::V1;
base::StringPiece log_id;
base::StringPiece extensions;
if (!ReadFixedBytes(kLogIdLength, input, &log_id) ||
« no previous file with comments | « net/cert/ct_objects_extractor_unittest.cc ('k') | net/cert/signed_certificate_timestamp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698