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

Unified Diff: net/base/x509_util_nss_unittest.cc

Issue 8890073: Handle Origin Bound Certificate expiration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« net/base/x509_util.h ('K') | « net/base/x509_util_nss.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_util_nss_unittest.cc
diff --git a/net/base/x509_util_nss_unittest.cc b/net/base/x509_util_nss_unittest.cc
index 74908748c0a1d3048ef8d0a0cdae0c1c955c990a..cb063c917578d85eaf8649e60a4e5ad7afff91e1 100644
--- a/net/base/x509_util_nss_unittest.cc
+++ b/net/base/x509_util_nss_unittest.cc
@@ -149,10 +149,11 @@ TEST(X509UtilNSSTest, CreateOriginBoundCertRSA) {
scoped_ptr<crypto::RSAPrivateKey> private_key(
crypto::RSAPrivateKey::Create(1024));
std::string der_cert;
- ASSERT_TRUE(x509_util::CreateOriginBoundCertRSA(private_key.get(),
- origin, 1,
- base::TimeDelta::FromDays(1),
- &der_cert));
+ ASSERT_TRUE(x509_util::CreateOriginBoundCertRSA(
+ private_key.get(),
+ origin, 1,
+ base::Time::Now() + base::TimeDelta::FromDays(1),
+ &der_cert));
VerifyOriginBoundCert(origin, der_cert);
@@ -170,10 +171,11 @@ TEST(X509UtilNSSTest, CreateOriginBoundCertEC) {
scoped_ptr<crypto::ECPrivateKey> private_key(
crypto::ECPrivateKey::Create());
std::string der_cert;
- ASSERT_TRUE(x509_util::CreateOriginBoundCertEC(private_key.get(),
- origin, 1,
- base::TimeDelta::FromDays(1),
- &der_cert));
+ ASSERT_TRUE(x509_util::CreateOriginBoundCertEC(
+ private_key.get(),
+ origin, 1,
+ base::Time::Now() + base::TimeDelta::FromDays(1),
+ &der_cert));
VerifyOriginBoundCert(origin, der_cert);
« net/base/x509_util.h ('K') | « net/base/x509_util_nss.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698