diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 01:46:19 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 01:46:19 +0000 |
commit | 4082fa2a9b307fc78675602bbcc0acade2029059 (patch) | |
tree | af99bc0b6de4414edea1b97af87316d203648095 /net/base/x509_util_openssl_unittest.cc | |
parent | 25142ecaf7ff6a2ade87625b34d715700cb7e68f (diff) | |
download | chromium_src-4082fa2a9b307fc78675602bbcc0acade2029059.zip chromium_src-4082fa2a9b307fc78675602bbcc0acade2029059.tar.gz chromium_src-4082fa2a9b307fc78675602bbcc0acade2029059.tar.bz2 |
Try#2: Handle Origin Bound Certificate expiration.
(Initialize test from raw time value to work around inability to parse dates past 2038 on 32-bit linux.)
BUG=107047
TEST=net_unittests, unit_tests
Review URL: http://codereview.chromium.org/9016002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_util_openssl_unittest.cc')
-rw-r--r-- | net/base/x509_util_openssl_unittest.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/base/x509_util_openssl_unittest.cc b/net/base/x509_util_openssl_unittest.cc index 23c33a3..5d96dfa 100644 --- a/net/base/x509_util_openssl_unittest.cc +++ b/net/base/x509_util_openssl_unittest.cc @@ -15,13 +15,16 @@ namespace net { // is present. TEST(X509UtilOpenSSLTest, CreateOriginBoundCertNotImplemented) { std::string origin = "http://weborigin.com:443"; + base::Time now = base::Time::Now(); scoped_ptr<crypto::RSAPrivateKey> private_key( crypto::RSAPrivateKey::Create(1024)); std::string der_cert; - EXPECT_FALSE(x509_util::CreateOriginBoundCertRSA(private_key.get(), - origin, 1, - base::TimeDelta::FromDays(1), - &der_cert)); + EXPECT_FALSE(x509_util::CreateOriginBoundCertRSA( + private_key.get(), + origin, 1, + now, + now + base::TimeDelta::FromDays(1), + &der_cert)); EXPECT_TRUE(der_cert.empty()); } |