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

Unified Diff: net/base/cert_verify_proc_unittest.cc

Issue 10883012: net: don't crash when processing a certificate with an unknown public key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 4 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
« no previous file with comments | « no previous file | net/base/x509_certificate_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_verify_proc_unittest.cc
diff --git a/net/base/cert_verify_proc_unittest.cc b/net/base/cert_verify_proc_unittest.cc
index 30bf28057c014d8fd05cde623aca973883fd8e37..cfbf8a950541e664df0cd4a5e6166253c4dc753c 100644
--- a/net/base/cert_verify_proc_unittest.cc
+++ b/net/base/cert_verify_proc_unittest.cc
@@ -223,6 +223,23 @@ TEST_F(CertVerifyProcTest, DISABLED_GlobalSignR3EVTest) {
EXPECT_EQ(ERR_CERT_DATE_INVALID, error);
}
+// Test that verifying an ECDSA certificate doesn't crash on XP. (See
+// crbug.com/144466).
+TEST_F(CertVerifyProcTest, ECDSA_RSA) {
+ FilePath certs_dir = GetTestCertsDirectory();
+
+ scoped_refptr<X509Certificate> cert =
+ ImportCertFromFile(certs_dir,
+ "prime256v1-ecdsa-ee-by-1024-rsa-intermediate.pem");
+
+ CertVerifyResult verify_result;
+ Verify(cert, "127.0.0.1", 0, NULL, &verify_result);
+
+ // We don't check verify_result because the certificate is signed by an
+ // unknown CA and will be considered invalid on XP because of the ECDSA
+ // public key.
+}
+
// Currently, only RSA and DSA keys are checked for weakness, and our example
// weak size is 768. These could change in the future.
//
« no previous file with comments | « no previous file | net/base/x509_certificate_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698