OLD | NEW |
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_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> |
11 #include <nss.h> | 11 #include <nss.h> |
12 #include <prerror.h> | 12 #include <prerror.h> |
13 #include <secerr.h> | 13 #include <secerr.h> |
14 #include <sechash.h> | 14 #include <sechash.h> |
15 #include <sslerr.h> | 15 #include <sslerr.h> |
16 | 16 |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "crypto/nss_util.h" | 18 #include "crypto/nss_util.h" |
19 #include "crypto/scoped_nss_types.h" | 19 #include "crypto/scoped_nss_types.h" |
20 #include "crypto/sha2.h" | 20 #include "crypto/sha2.h" |
21 #include "net/base/asn1_util.h" | |
22 #include "net/base/cert_status_flags.h" | |
23 #include "net/base/cert_verifier.h" | |
24 #include "net/base/cert_verify_result.h" | |
25 #include "net/base/crl_set.h" | |
26 #include "net/base/ev_root_ca_metadata.h" | |
27 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
28 #include "net/base/x509_certificate.h" | 22 #include "net/cert/asn1_util.h" |
29 #include "net/base/x509_util_nss.h" | 23 #include "net/cert/cert_status_flags.h" |
| 24 #include "net/cert/cert_verifier.h" |
| 25 #include "net/cert/cert_verify_result.h" |
| 26 #include "net/cert/crl_set.h" |
| 27 #include "net/cert/ev_root_ca_metadata.h" |
| 28 #include "net/cert/x509_certificate.h" |
| 29 #include "net/cert/x509_util_nss.h" |
30 | 30 |
31 #if defined(OS_IOS) | 31 #if defined(OS_IOS) |
32 #include <CommonCrypto/CommonDigest.h> | 32 #include <CommonCrypto/CommonDigest.h> |
33 #include "net/base/x509_util_ios.h" | 33 #include "net/cert/x509_util_ios.h" |
34 #endif // defined(OS_IOS) | 34 #endif // defined(OS_IOS) |
35 | 35 |
36 #define NSS_VERSION_NUM (NSS_VMAJOR * 10000 + NSS_VMINOR * 100 + NSS_VPATCH) | 36 #define NSS_VERSION_NUM (NSS_VMAJOR * 10000 + NSS_VMINOR * 100 + NSS_VPATCH) |
37 #if NSS_VERSION_NUM < 31305 | 37 #if NSS_VERSION_NUM < 31305 |
38 // Added in NSS 3.13.5. | 38 // Added in NSS 3.13.5. |
39 #define SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED -8016 | 39 #define SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED -8016 |
40 #endif | 40 #endif |
41 | 41 |
42 #if NSS_VERSION_NUM < 31402 | 42 #if NSS_VERSION_NUM < 31402 |
43 // Added in NSS 3.14.2. | 43 // Added in NSS 3.14.2. |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 if ((flags & CertVerifier::VERIFY_EV_CERT) && is_ev_candidate && | 872 if ((flags & CertVerifier::VERIFY_EV_CERT) && is_ev_candidate && |
873 VerifyEV(cert_handle, flags, crl_set, metadata, ev_policy_oid, | 873 VerifyEV(cert_handle, flags, crl_set, metadata, ev_policy_oid, |
874 trust_anchors.get())) { | 874 trust_anchors.get())) { |
875 verify_result->cert_status |= CERT_STATUS_IS_EV; | 875 verify_result->cert_status |= CERT_STATUS_IS_EV; |
876 } | 876 } |
877 | 877 |
878 return OK; | 878 return OK; |
879 } | 879 } |
880 | 880 |
881 } // namespace net | 881 } // namespace net |
OLD | NEW |