diff options
author | eranm@google.com <eranm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 01:42:03 +0000 |
---|---|---|
committer | eranm@google.com <eranm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 01:42:03 +0000 |
commit | 95ac16b0adc0c0b85dd2f2e66cd930bfaceaf30f (patch) | |
tree | fe723da6a2d400e8f681989b65ee05d987f94450 /net/test/ct_test_util.h | |
parent | c457dcf77264057729d025b3f85921c669fc0e20 (diff) | |
download | chromium_src-95ac16b0adc0c0b85dd2f2e66cd930bfaceaf30f.zip chromium_src-95ac16b0adc0c0b85dd2f2e66cd930bfaceaf30f.tar.gz chromium_src-95ac16b0adc0c0b85dd2f2e66cd930bfaceaf30f.tar.bz2 |
CT: First step towards supporting Certificate Transparency in Chrome.
This patch adds Signed Certificate Timestamp (SCT) encoding/decoding.
SCT is the Certificate Transparency (CT) structure containing a proof
of a public log's commitment to adding a certificate to its public
repository.
The next patches would be extracting the SCTs when embedded in
certificates and verifying the signature from the SCT over them.
BUG=309578
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232131
Review URL: https://codereview.chromium.org/37633002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test/ct_test_util.h')
-rw-r--r-- | net/test/ct_test_util.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net/test/ct_test_util.h b/net/test/ct_test_util.h new file mode 100644 index 0000000..79881ce --- /dev/null +++ b/net/test/ct_test_util.h @@ -0,0 +1,35 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NET_CERT_CT_TEST_UTIL_H_ +#define NET_CERT_CT_TEST_UTIL_H_ + +#include <string> + +namespace net { + +class X509Certificate; + +namespace ct { + +struct LogEntry; +struct SignedCertificateTimestamp; + +// Fills |entry| with test data for an X.509 entry. +void GetX509CertLogEntry(LogEntry* entry); + +// Fills |entry| with test data for a Precertificate entry. +void GetPrecertLogEntry(LogEntry* entry); + +// Returns the binary representation of a test DigitallySigned +std::string GetTestDigitallySigned(); + +// Returns the binary representation of a test serialized SCT. +std::string GetTestSignedCertificateTimestamp(); + +} // namespace ct + +} // namespace net + +#endif // NET_CERT_CT_TEST_UTIL_H_ |