Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "net/base/cert_verify_proc.h" | |
| 6 | |
| 7 #include "build/build_config.h" | |
| 8 #include "net/base/cert_verify_proc_mac.h" | |
| 9 #include "net/base/cert_verify_proc_nss.h" | |
| 10 #include "net/base/cert_verify_proc_openssl.h" | |
| 11 #include "net/base/cert_verify_proc_win.h" | |
|
wtc
2012/03/13 22:37:57
Nit: it seems that these platform-specific headers
| |
| 12 | |
| 13 namespace net { | |
| 14 | |
| 15 // static | |
| 16 CertVerifyProc* CertVerifyProc::CreateDefault() { | |
| 17 #if defined(USE_NSS) | |
| 18 return new CertVerifyProcNSS(); | |
| 19 #elif defined(USE_OPENSSL) | |
| 20 return new CertVerifyProcOpenSSL(); | |
| 21 #elif defined(OS_MACOSX) | |
| 22 return new CertVerifyProcMac(); | |
| 23 #elif defined(OS_WIN) | |
| 24 return new CertVerifyProcWin(); | |
| 25 #else | |
| 26 #error Implement certificate verification for your platform | |
| 27 #endif | |
| 28 } | |
| 29 | |
| 30 CertVerifyProc::CertVerifyProc() {} | |
| 31 | |
| 32 CertVerifyProc::~CertVerifyProc() {} | |
| 33 | |
| 34 int CertVerifyProc::Verify(X509Certificate* cert, | |
| 35 const std::string& hostname, | |
| 36 int flags, | |
| 37 CRLSet* crl_set, | |
| 38 CertVerifyResult* verify_result) { | |
| 39 return VerifyInternal(cert, hostname, flags, crl_set, verify_result); | |
|
wtc
2012/03/13 22:37:57
Nit: the purpose of the Verify/VerifyInternal spli
| |
| 40 } | |
| 41 | |
| 42 } // namespace net | |
| OLD | NEW |