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

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

Issue 509273002: Detect SHA-1 when it appears in certificate chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_status_extended
Patch Set: Correct Android comment Created 6 years, 2 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_mac.cc ('k') | net/cert/cert_verify_proc_openssl.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_nss.h" 5 #include "net/cert/cert_verify_proc_nss.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include <cert.h> 10 #include <cert.h>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 switch (oid_tag) { 196 switch (oid_tag) {
197 case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION: 197 case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION:
198 verify_result->has_md5 = true; 198 verify_result->has_md5 = true;
199 break; 199 break;
200 case SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION: 200 case SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION:
201 verify_result->has_md2 = true; 201 verify_result->has_md2 = true;
202 break; 202 break;
203 case SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION: 203 case SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION:
204 verify_result->has_md4 = true; 204 verify_result->has_md4 = true;
205 break; 205 break;
206 case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION:
207 case SEC_OID_ISO_SHA1_WITH_RSA_SIGNATURE:
208 case SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST:
209 case SEC_OID_ANSIX962_ECDSA_SHA1_SIGNATURE:
210 verify_result->has_sha1 = true;
211 break;
206 default: 212 default:
207 break; 213 break;
208 } 214 }
209 } 215 }
210 216
211 if (root_cert) 217 if (root_cert)
212 verified_chain.push_back(root_cert); 218 verified_chain.push_back(root_cert);
213 #if defined(OS_IOS) 219 #if defined(OS_IOS)
214 verify_result->verified_cert = 220 verify_result->verified_cert =
215 x509_util_ios::CreateCertFromNSSHandles(verified_cert, verified_chain); 221 x509_util_ios::CreateCertFromNSSHandles(verified_cert, verified_chain);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 return VerifyInternalImpl(cert, 935 return VerifyInternalImpl(cert,
930 hostname, 936 hostname,
931 flags, 937 flags,
932 crl_set, 938 crl_set,
933 additional_trust_anchors, 939 additional_trust_anchors,
934 NULL, // chain_verify_callback 940 NULL, // chain_verify_callback
935 verify_result); 941 verify_result);
936 } 942 }
937 943
938 } // namespace net 944 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_mac.cc ('k') | net/cert/cert_verify_proc_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698