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

Unified Diff: net/cert/x509_util_openssl_unittest.cc

Issue 27832002: Sign self-signed certs with SHA256. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 months 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/cert/x509_util_openssl_unittest.cc
===================================================================
--- net/cert/x509_util_openssl_unittest.cc (revision 229411)
+++ net/cert/x509_util_openssl_unittest.cc (working copy)
@@ -35,23 +35,22 @@
EXPECT_FALSE(x509_util::IsSupportedValidityRange(too_late, too_late));
}
-// For OpenSSL, x509_util::CreateDomainBoundCertEC() is not yet implemented
-// and should return false. This unit test ensures that a stub implementation
-// is present.
+// For OpenSSL, x509_util::CreateKeyAndDomainBoundCertEC() is not yet
+// implemented and should return false. This unit test ensures that a stub
+// implementation is present.
TEST(X509UtilOpenSSLTest, CreateDomainBoundCertNotImplemented) {
std::string domain = "weborigin.com";
base::Time now = base::Time::Now();
- scoped_ptr<crypto::ECPrivateKey> private_key(
- crypto::ECPrivateKey::Create());
+ crypto::ECPrivateKey* raw_key = NULL;
std::string der_cert;
- EXPECT_FALSE(x509_util::CreateDomainBoundCertEC(
- private_key.get(),
+ EXPECT_FALSE(x509_util::CreateKeyAndDomainBoundCertEC(
domain, 1,
now,
now + base::TimeDelta::FromDays(1),
+ &raw_key,
&der_cert));
EXPECT_TRUE(der_cert.empty());
-
+ EXPECT_FALSE(raw_key != NULL);
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698