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

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

Issue 1082123003: Rename USE_NSS to USE_NSS_CERTS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-nss-certs
Patch Set: rebase Created 5 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
« no previous file with comments | « net/base/keygen_handler_unittest.cc ('k') | net/cert/cert_verify_proc_unittest.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.h" 5 #include "net/cert/cert_verify_proc.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/sha1.h" 11 #include "base/sha1.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
16 #include "net/base/net_util.h" 16 #include "net/base/net_util.h"
17 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 17 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
18 #include "net/cert/cert_status_flags.h" 18 #include "net/cert/cert_status_flags.h"
19 #include "net/cert/cert_verifier.h" 19 #include "net/cert/cert_verifier.h"
20 #include "net/cert/cert_verify_proc_whitelist.h" 20 #include "net/cert/cert_verify_proc_whitelist.h"
21 #include "net/cert/cert_verify_result.h" 21 #include "net/cert/cert_verify_result.h"
22 #include "net/cert/crl_set.h" 22 #include "net/cert/crl_set.h"
23 #include "net/cert/x509_certificate.h" 23 #include "net/cert/x509_certificate.h"
24 #include "url/url_canon.h" 24 #include "url/url_canon.h"
25 25
26 #if defined(USE_NSS) || defined(OS_IOS) 26 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
27 #include "net/cert/cert_verify_proc_nss.h" 27 #include "net/cert/cert_verify_proc_nss.h"
28 #elif defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID) 28 #elif defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID)
29 #include "net/cert/cert_verify_proc_openssl.h" 29 #include "net/cert/cert_verify_proc_openssl.h"
30 #elif defined(OS_ANDROID) 30 #elif defined(OS_ANDROID)
31 #include "net/cert/cert_verify_proc_android.h" 31 #include "net/cert/cert_verify_proc_android.h"
32 #elif defined(OS_MACOSX) 32 #elif defined(OS_MACOSX)
33 #include "net/cert/cert_verify_proc_mac.h" 33 #include "net/cert/cert_verify_proc_mac.h"
34 #elif defined(OS_WIN) 34 #elif defined(OS_WIN)
35 #include "net/cert/cert_verify_proc_win.h" 35 #include "net/cert/cert_verify_proc_win.h"
36 #else 36 #else
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 weak_key = true; 162 weak_key = true;
163 } 163 }
164 164
165 return weak_key; 165 return weak_key;
166 } 166 }
167 167
168 } // namespace 168 } // namespace
169 169
170 // static 170 // static
171 CertVerifyProc* CertVerifyProc::CreateDefault() { 171 CertVerifyProc* CertVerifyProc::CreateDefault() {
172 #if defined(USE_NSS) || defined(OS_IOS) 172 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
173 return new CertVerifyProcNSS(); 173 return new CertVerifyProcNSS();
174 #elif defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID) 174 #elif defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID)
175 return new CertVerifyProcOpenSSL(); 175 return new CertVerifyProcOpenSSL();
176 #elif defined(OS_ANDROID) 176 #elif defined(OS_ANDROID)
177 return new CertVerifyProcAndroid(); 177 return new CertVerifyProcAndroid();
178 #elif defined(OS_MACOSX) 178 #elif defined(OS_MACOSX)
179 return new CertVerifyProcMac(); 179 return new CertVerifyProcMac();
180 #elif defined(OS_WIN) 180 #elif defined(OS_WIN)
181 return new CertVerifyProcWin(); 181 return new CertVerifyProcWin();
182 #else 182 #else
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 return true; 670 return true;
671 671
672 // For certificates issued after 1 April 2015: 39 months. 672 // For certificates issued after 1 April 2015: 39 months.
673 if (start >= time_2015_04_01 && month_diff > 39) 673 if (start >= time_2015_04_01 && month_diff > 39)
674 return true; 674 return true;
675 675
676 return false; 676 return false;
677 } 677 }
678 678
679 } // namespace net 679 } // namespace net
OLDNEW
« no previous file with comments | « net/base/keygen_handler_unittest.cc ('k') | net/cert/cert_verify_proc_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698