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/x509_certificate.h" |
| 9 |
| 10 namespace net { |
| 11 |
| 12 // TODO(rsleevi): Temporary refactoring - http://crbug.com/114343 |
| 13 class CertVerifyProcStub : public CertVerifyProc { |
| 14 public: |
| 15 CertVerifyProcStub() {} |
| 16 |
| 17 private: |
| 18 virtual ~CertVerifyProcStub() {} |
| 19 |
| 20 // CertVerifyProc implementation |
| 21 virtual int VerifyInternal(X509Certificate* cert, |
| 22 const std::string& hostname, |
| 23 int flags, |
| 24 CRLSet* crl_set, |
| 25 CertVerifyResult* verify_result) OVERRIDE { |
| 26 return cert->Verify(hostname, flags, crl_set, verify_result); |
| 27 } |
| 28 }; |
| 29 |
| 30 // static |
| 31 CertVerifyProc* CertVerifyProc::CreateDefault() { |
| 32 return new CertVerifyProcStub(); |
| 33 } |
| 34 |
| 35 CertVerifyProc::CertVerifyProc() {} |
| 36 |
| 37 CertVerifyProc::~CertVerifyProc() {} |
| 38 |
| 39 int CertVerifyProc::Verify(X509Certificate* cert, |
| 40 const std::string& hostname, |
| 41 int flags, |
| 42 CRLSet* crl_set, |
| 43 CertVerifyResult* verify_result) { |
| 44 return VerifyInternal(cert, hostname, flags, crl_set, verify_result); |
| 45 } |
| 46 |
| 47 } // namespace net |
OLD | NEW |