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 #include "net/cert/ct_log_verifier.h" | 5 #include "net/cert/ct_log_verifier.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/cert/ct_serialization.h" | 8 #include "net/cert/ct_serialization.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 26 matching lines...) Expand all Loading... |
37 << ", got " << sct.signature.signature_algorithm << "."; | 37 << ", got " << sct.signature.signature_algorithm << "."; |
38 return false; | 38 return false; |
39 } | 39 } |
40 | 40 |
41 std::string serialized_log_entry; | 41 std::string serialized_log_entry; |
42 if (!ct::EncodeLogEntry(entry, &serialized_log_entry)) { | 42 if (!ct::EncodeLogEntry(entry, &serialized_log_entry)) { |
43 DVLOG(1) << "Unable to serialize entry."; | 43 DVLOG(1) << "Unable to serialize entry."; |
44 return false; | 44 return false; |
45 } | 45 } |
46 std::string serialized_data; | 46 std::string serialized_data; |
47 if (!ct::EncodeV1SCTSignedData(sct.timestamp, serialized_log_entry, | 47 if (!ct::EncodeV1SCTSignedData(sct.timestamp, |
48 sct.extensions, &serialized_data)) { | 48 serialized_log_entry, |
| 49 sct.extensions, |
| 50 &serialized_data)) { |
49 DVLOG(1) << "Unable to create SCT to verify."; | 51 DVLOG(1) << "Unable to create SCT to verify."; |
50 return false; | 52 return false; |
51 } | 53 } |
52 | 54 |
53 return VerifySignature(serialized_data, sct.signature.signature_data); | 55 return VerifySignature(serialized_data, sct.signature.signature_data); |
54 } | 56 } |
55 | 57 |
56 } // namespace net | 58 } // namespace net |
OLD | NEW |