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

Side by Side Diff: net/cert/cert_verify_proc_ios.cc

Issue 2735733003: Disable commonName matching for certificates (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/cert/cert_verify_proc_android.cc ('k') | net/cert/cert_verify_proc_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/cert_verify_proc_ios.h" 5 #include "net/cert/cert_verify_proc_ios.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 break; 259 break;
260 case kSecTrustResultDeny: 260 case kSecTrustResultDeny:
261 verify_result->cert_status |= CERT_STATUS_AUTHORITY_INVALID; 261 verify_result->cert_status |= CERT_STATUS_AUTHORITY_INVALID;
262 break; 262 break;
263 default: 263 default:
264 verify_result->cert_status |= GetCertFailureStatusFromTrust(trust_ref); 264 verify_result->cert_status |= GetCertFailureStatusFromTrust(trust_ref);
265 } 265 }
266 266
267 GetCertChainInfo(final_chain, verify_result); 267 GetCertChainInfo(final_chain, verify_result);
268 268
269 // iOS lacks the ability to distinguish built-in versus non-built-in roots,
270 // so opt to 'fail open' of any restrictive policies that apply to built-in
271 // roots.
269 verify_result->is_issued_by_known_root = false; 272 verify_result->is_issued_by_known_root = false;
270 273
271 if (IsCertStatusError(verify_result->cert_status)) 274 if (IsCertStatusError(verify_result->cert_status))
272 return MapCertStatusToNetError(verify_result->cert_status); 275 return MapCertStatusToNetError(verify_result->cert_status);
273 276
274 return OK; 277 return OK;
275 } 278 }
276 279
277 } // namespace net 280 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_android.cc ('k') | net/cert/cert_verify_proc_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698