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

Unified Diff: net/cert/cert_verify_proc_unittest.cc

Issue 2813043002: Add tests for keyUsage to the built-in cert verifier. (Closed)
Patch Set: remove unnecessary change. Created 3 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 | « no previous file | net/cert/internal/verify_certificate_chain.h » ('j') | 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 fdb254d1bc5fc94e8f1c4166efb732dc5340a8e0..baa67dce82ffe6bfd297a8c24507cf5f4748b9cc 100644
--- a/net/cert/cert_verify_proc_unittest.cc
+++ b/net/cert/cert_verify_proc_unittest.cc
@@ -1202,11 +1202,6 @@ TEST_P(CertVerifyProcInternalTest, PublicKeyHashes) {
// The Key Usage extension in this RSA SSL server certificate does not have
// the keyEncipherment bit.
TEST_P(CertVerifyProcInternalTest, InvalidKeyUsage) {
- if (verify_proc_type() == CERT_VERIFY_PROC_BUILTIN) {
- LOG(INFO) << "TODO(crbug.com/649017): Skipping test as not yet implemented "
- "in builting verifier";
- return;
- }
base::FilePath certs_dir = GetTestCertsDirectory();
scoped_refptr<X509Certificate> server_cert =
@@ -1220,10 +1215,10 @@ TEST_P(CertVerifyProcInternalTest, InvalidKeyUsage) {
// TODO(eroman): Change the test data so results are consistent across
// verifiers.
- if (verify_proc_type() == CERT_VERIFY_PROC_OPENSSL) {
+ if (verify_proc_type() == CERT_VERIFY_PROC_OPENSSL ||
+ verify_proc_type() == CERT_VERIFY_PROC_BUILTIN) {
mattm 2017/04/12 01:58:05 From your other email, NSS was the only one that c
eroman 2017/04/14 21:07:47 This test is not well described. There are two cor
eroman 2017/04/14 21:42:48 Done.
// 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.
+ // However, the wrong key usage is not checked.
EXPECT_THAT(error, IsError(ERR_CERT_AUTHORITY_INVALID));
} else {
EXPECT_THAT(error, IsError(ERR_CERT_INVALID));
« no previous file with comments | « no previous file | net/cert/internal/verify_certificate_chain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698