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

Unified Diff: net/cert/cert_verify_proc_unittest.cc

Issue 14358023: Differentiate between VERIFY_FAILED and VERIFY_INCORRECT_KEY_USAGE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-enable the test, and make it pass. Created 7 years, 8 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 | « net/cert/cert_verify_proc_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_unittest.cc
diff --git a/net/cert/cert_verify_proc_unittest.cc b/net/cert/cert_verify_proc_unittest.cc
index 2c0e97dcdc1e31b9069a2324a6e70927d690f57c..d694625dddc5847524d2177a996367640e89c0c1 100644
--- a/net/cert/cert_verify_proc_unittest.cc
+++ b/net/cert/cert_verify_proc_unittest.cc
@@ -528,18 +528,15 @@ TEST_F(CertVerifyProcTest, InvalidKeyUsage) {
CertVerifyResult verify_result;
int error = Verify(server_cert, "jira.aquameta.com", flags, NULL,
empty_cert_list_, &verify_result);
-#if defined(USE_OPENSSL)
- // This certificate has two errors: "invalid key usage" and "untrusted CA".
- // However, OpenSSL returns only one (the latter), and we can't detect
- // the other errors.
- EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, error);
-#else
EXPECT_EQ(ERR_CERT_INVALID, error);
EXPECT_TRUE(verify_result.cert_status & CERT_STATUS_INVALID);
-#endif
+
// TODO(wtc): fix http://crbug.com/75520 to get all the certificate errors
// from NSS.
-#if !defined(USE_NSS) && !defined(OS_IOS)
+#if !defined(USE_NSS) && !defined(OS_IOS) && !defined(USE_OPENSSL)
+ // This certificate has two errors: "invalid key usage" and "untrusted CA".
+ // However, OpenSSL returns only one (the former), and we can't detect
+ // the other errors.
joth 2013/04/23 18:27:21 think this will fail on linux redux (as the "can't
palmer 2013/04/23 20:47:41 Done.
// The certificate is issued by an unknown CA.
EXPECT_TRUE(verify_result.cert_status & CERT_STATUS_AUTHORITY_INVALID);
#endif
« no previous file with comments | « net/cert/cert_verify_proc_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698