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

Unified Diff: net/cert/cert_verify_proc_openssl.cc

Issue 2719273002: Disable commonName matching for certificates (Closed)
Patch Set: Update tests & fix small bug with IPvsDNS sans Created 3 years, 10 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/cert_verify_proc_openssl.cc
diff --git a/net/cert/cert_verify_proc_openssl.cc b/net/cert/cert_verify_proc_openssl.cc
index d822bc00d6cb80a8449c9a24752411d179b89286..13a19d8e16322329c01a24395f2f30ddf7c2520f 100644
--- a/net/cert/cert_verify_proc_openssl.cc
+++ b/net/cert/cert_verify_proc_openssl.cc
@@ -181,11 +181,6 @@ int CertVerifyProcOpenSSL::VerifyInternal(
CertVerifyResult* verify_result) {
crypto::EnsureOpenSSLInit();
- if (!cert->VerifyNameMatch(hostname,
- &verify_result->common_name_fallback_used)) {
- verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID;
- }
-
bssl::UniquePtr<X509_STORE_CTX> ctx(X509_STORE_CTX_new());
std::unique_ptr<STACK_OF(X509), ShallowX509StackDeleter> intermediates(
@@ -219,6 +214,7 @@ int CertVerifyProcOpenSSL::VerifyInternal(
GetCertChainInfo(ctx.get(), verify_result);
AppendPublicKeyHashes(ctx.get(), &verify_result->public_key_hashes);
+
if (IsCertStatusError(verify_result->cert_status))
return MapCertStatusToNetError(verify_result->cert_status);

Powered by Google App Engine
This is Rietveld 408576698