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

Unified Diff: net/base/cert_verify_proc_unittest.cc

Issue 10879097: Merge 153220 - net: don't crash when processing a certificate with an unknown public key. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1229/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
===================================================================
--- net/base/cert_verify_proc_unittest.cc (revision 153489)
+++ net/base/cert_verify_proc_unittest.cc (working copy)
@@ -222,6 +222,23 @@
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