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

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

Issue 686883002: Add crypto/wincrypt_shim.h wrapper header to resolve BoringSSL conflicts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sleevi comments Created 6 years, 1 month 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_database_win.cc ('k') | net/cert/sha256_legacy_support_win.h » ('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_win.h" 5 #include "net/cert/cert_verify_proc_win.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // a NULL character. 184 // a NULL character.
185 bool CertSubjectCommonNameHasNull(PCCERT_CONTEXT cert) { 185 bool CertSubjectCommonNameHasNull(PCCERT_CONTEXT cert) {
186 CRYPT_DECODE_PARA decode_para; 186 CRYPT_DECODE_PARA decode_para;
187 decode_para.cbSize = sizeof(decode_para); 187 decode_para.cbSize = sizeof(decode_para);
188 decode_para.pfnAlloc = crypto::CryptAlloc; 188 decode_para.pfnAlloc = crypto::CryptAlloc;
189 decode_para.pfnFree = crypto::CryptFree; 189 decode_para.pfnFree = crypto::CryptFree;
190 CERT_NAME_INFO* name_info = NULL; 190 CERT_NAME_INFO* name_info = NULL;
191 DWORD name_info_size = 0; 191 DWORD name_info_size = 0;
192 BOOL rv; 192 BOOL rv;
193 rv = CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 193 rv = CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
194 X509_NAME, 194 WINCRYPT_X509_NAME,
195 cert->pCertInfo->Subject.pbData, 195 cert->pCertInfo->Subject.pbData,
196 cert->pCertInfo->Subject.cbData, 196 cert->pCertInfo->Subject.cbData,
197 CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_NOCOPY_FLAG, 197 CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_NOCOPY_FLAG,
198 &decode_para, 198 &decode_para,
199 &name_info, 199 &name_info,
200 &name_info_size); 200 &name_info_size);
201 if (rv) { 201 if (rv) {
202 scoped_ptr<CERT_NAME_INFO, base::FreeDeleter> scoped_name_info(name_info); 202 scoped_ptr<CERT_NAME_INFO, base::FreeDeleter> scoped_name_info(name_info);
203 203
204 // The Subject field may have multiple common names. According to the 204 // The Subject field may have multiple common names. According to the
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 return MapCertStatusToNetError(verify_result->cert_status); 803 return MapCertStatusToNetError(verify_result->cert_status);
804 804
805 if (ev_policy_oid && 805 if (ev_policy_oid &&
806 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { 806 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) {
807 verify_result->cert_status |= CERT_STATUS_IS_EV; 807 verify_result->cert_status |= CERT_STATUS_IS_EV;
808 } 808 }
809 return OK; 809 return OK;
810 } 810 }
811 811
812 } // namespace net 812 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_database_win.cc ('k') | net/cert/sha256_legacy_support_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698