| 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/signed_certificate_timestamp.h" | 5 #include "net/cert/signed_certificate_timestamp.h" |
| 6 | 6 |
| 7 #include "base/pickle.h" | 7 #include "base/pickle.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 CHECK(pickle->WriteInt(signature.signature_algorithm)); | 41 CHECK(pickle->WriteInt(signature.signature_algorithm)); |
| 42 CHECK(pickle->WriteString(signature.signature_data)); | 42 CHECK(pickle->WriteString(signature.signature_data)); |
| 43 CHECK(pickle->WriteInt(origin)); | 43 CHECK(pickle->WriteInt(origin)); |
| 44 CHECK(pickle->WriteString(log_description)); | 44 CHECK(pickle->WriteString(log_description)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // static | 47 // static |
| 48 scoped_refptr<SignedCertificateTimestamp> | 48 scoped_refptr<SignedCertificateTimestamp> |
| 49 SignedCertificateTimestamp::CreateFromPickle(base::PickleIterator* iter) { | 49 SignedCertificateTimestamp::CreateFromPickle(base::PickleIterator* iter) { |
| 50 int version; | 50 int version; |
| 51 int64 timestamp; | 51 int64_t timestamp; |
| 52 int hash_algorithm; | 52 int hash_algorithm; |
| 53 int sig_algorithm; | 53 int sig_algorithm; |
| 54 scoped_refptr<SignedCertificateTimestamp> sct( | 54 scoped_refptr<SignedCertificateTimestamp> sct( |
| 55 new SignedCertificateTimestamp()); | 55 new SignedCertificateTimestamp()); |
| 56 int origin; | 56 int origin; |
| 57 // string values are set directly | 57 // string values are set directly |
| 58 if (!(iter->ReadInt(&version) && | 58 if (!(iter->ReadInt(&version) && |
| 59 iter->ReadString(&sct->log_id) && | 59 iter->ReadString(&sct->log_id) && |
| 60 iter->ReadInt64(×tamp) && | 60 iter->ReadInt64(×tamp) && |
| 61 iter->ReadString(&sct->extensions) && | 61 iter->ReadString(&sct->extensions) && |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 bool DigitallySigned::SignatureParametersMatch( | 94 bool DigitallySigned::SignatureParametersMatch( |
| 95 HashAlgorithm other_hash_algorithm, | 95 HashAlgorithm other_hash_algorithm, |
| 96 SignatureAlgorithm other_signature_algorithm) const { | 96 SignatureAlgorithm other_signature_algorithm) const { |
| 97 return (hash_algorithm == other_hash_algorithm) && | 97 return (hash_algorithm == other_hash_algorithm) && |
| 98 (signature_algorithm == other_signature_algorithm); | 98 (signature_algorithm == other_signature_algorithm); |
| 99 } | 99 } |
| 100 } // namespace ct | 100 } // namespace ct |
| 101 | 101 |
| 102 } // namespace net | 102 } // namespace net |
| OLD | NEW |