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

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

Issue 13006020: net: extract net/cert out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/base/cert_verify_proc_openssl.h" 5 #include "net/cert/cert_verify_proc_openssl.h"
6 6
7 #include <openssl/x509v3.h> 7 #include <openssl/x509v3.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/sha1.h" 13 #include "base/sha1.h"
14 #include "crypto/openssl_util.h" 14 #include "crypto/openssl_util.h"
15 #include "crypto/sha2.h" 15 #include "crypto/sha2.h"
16 #include "net/base/asn1_util.h"
17 #include "net/base/cert_status_flags.h"
18 #include "net/base/cert_verifier.h"
19 #include "net/base/cert_verify_result.h"
20 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
21 #include "net/base/x509_certificate.h" 17 #include "net/cert/asn1_util.h"
18 #include "net/cert/cert_status_flags.h"
19 #include "net/cert/cert_verifier.h"
20 #include "net/cert/cert_verify_result.h"
21 #include "net/cert/x509_certificate.h"
22 22
23 namespace net { 23 namespace net {
24 24
25 namespace { 25 namespace {
26 26
27 // Maps X509_STORE_CTX_get_error() return values to our cert status flags. 27 // Maps X509_STORE_CTX_get_error() return values to our cert status flags.
28 CertStatus MapCertErrorToCertStatus(int err) { 28 CertStatus MapCertErrorToCertStatus(int err) {
29 switch (err) { 29 switch (err) {
30 case X509_V_ERR_SUBJECT_ISSUER_MISMATCH: 30 case X509_V_ERR_SUBJECT_ISSUER_MISMATCH:
31 return CERT_STATUS_COMMON_NAME_INVALID; 31 return CERT_STATUS_COMMON_NAME_INVALID;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // TODO(joth): if the motivations described in 221 // TODO(joth): if the motivations described in
222 // http://src.chromium.org/viewvc/chrome?view=rev&revision=80778 become an 222 // http://src.chromium.org/viewvc/chrome?view=rev&revision=80778 become an
223 // issue on OpenSSL builds, we will need to embed a hardcoded list of well 223 // issue on OpenSSL builds, we will need to embed a hardcoded list of well
224 // known root CAs, as per the _mac and _win versions. 224 // known root CAs, as per the _mac and _win versions.
225 verify_result->is_issued_by_known_root = true; 225 verify_result->is_issued_by_known_root = true;
226 226
227 return OK; 227 return OK;
228 } 228 }
229 229
230 } // namespace net 230 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698