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

Unified Diff: net/test/ct_test_util.cc

Issue 72333007: Add an SignedCertificateTimetampStore, making SignedCertificateTimestamp be refcounted to aid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@piecewise
Patch Set: Fixes for wtc. Created 7 years, 1 month 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
Index: net/test/ct_test_util.cc
diff --git a/net/test/ct_test_util.cc b/net/test/ct_test_util.cc
index db690e3b6e16d423da5e943fb2bdcb1f33cf89b0..44b173f9ef4c2dd5b04f5a39758fd77879c72f5e 100644
--- a/net/test/ct_test_util.cc
+++ b/net/test/ct_test_util.cc
@@ -133,7 +133,10 @@ std::string GetTestPublicKeyId() {
return HexToBytes(kTestKeyId);
}
-void GetX509CertSCT(SignedCertificateTimestamp* sct) {
+void GetX509CertSCT(scoped_refptr<SignedCertificateTimestamp>* sct_ref) {
+ CHECK(sct_ref != NULL);
+ *sct_ref = new SignedCertificateTimestamp();
+ SignedCertificateTimestamp *const sct(sct_ref->get());
sct->log_id = HexToBytes(kTestKeyId);
sct->timestamp = base::Time::UnixEpoch() +
base::TimeDelta::FromMilliseconds(GG_UINT64_C(1365181456089));
@@ -144,7 +147,10 @@ void GetX509CertSCT(SignedCertificateTimestamp* sct) {
sct->signature.signature_data = HexToBytes(kTestSCTSignatureData);
}
-void GetPrecertSCT(SignedCertificateTimestamp* sct) {
+void GetPrecertSCT(scoped_refptr<SignedCertificateTimestamp>* sct_ref) {
+ CHECK(sct_ref != NULL);
+ *sct_ref = new SignedCertificateTimestamp();
+ SignedCertificateTimestamp *const sct(sct_ref->get());
sct->log_id = HexToBytes(kTestKeyId);
sct->timestamp = base::Time::UnixEpoch() +
base::TimeDelta::FromMilliseconds(GG_UINT64_C(1365181456275));
« content/public/browser/signed_certificate_timestamp_store.h ('K') | « net/test/ct_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698