| 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 #ifndef NET_BASE_CERT_VERIFY_PROC_MAC_H_ | 5 #ifndef NET_BASE_CERT_VERIFY_PROC_MAC_H_ |
| 6 #define NET_BASE_CERT_VERIFY_PROC_MAC_H_ | 6 #define NET_BASE_CERT_VERIFY_PROC_MAC_H_ |
| 7 | 7 |
| 8 #include "net/base/cert_verify_proc.h" | 8 #include "net/base/cert_verify_proc.h" |
| 9 | 9 |
| 10 #include "base/synchronization/lock.h" | |
| 11 | |
| 12 namespace net { | 10 namespace net { |
| 13 | 11 |
| 14 // Performs certificate path construction and validation using OS X's | 12 // Performs certificate path construction and validation using OS X's |
| 15 // Security.framework. | 13 // Security.framework. |
| 16 class CertVerifyProcMac : public CertVerifyProc { | 14 class CertVerifyProcMac : public CertVerifyProc { |
| 17 public: | 15 public: |
| 18 CertVerifyProcMac(); | 16 CertVerifyProcMac(); |
| 19 | 17 |
| 20 protected: | 18 protected: |
| 21 virtual ~CertVerifyProcMac(); | 19 virtual ~CertVerifyProcMac(); |
| 22 | 20 |
| 23 private: | 21 private: |
| 24 virtual int VerifyInternal(X509Certificate* cert, | 22 virtual int VerifyInternal(X509Certificate* cert, |
| 25 const std::string& hostname, | 23 const std::string& hostname, |
| 26 int flags, | 24 int flags, |
| 27 CRLSet* crl_set, | 25 CRLSet* crl_set, |
| 28 CertVerifyResult* verify_result) OVERRIDE; | 26 CertVerifyResult* verify_result) OVERRIDE; |
| 29 | |
| 30 // Blocks multiple threads from verifying the cert simultaneously. | |
| 31 // (Marked mutable because it's used in a const method.) | |
| 32 mutable base::Lock verification_lock_; | |
| 33 }; | 27 }; |
| 34 | 28 |
| 35 } // namespace net | 29 } // namespace net |
| 36 | 30 |
| 37 #endif // NET_BASE_CERT_VERIFY_PROC_MAC_H_ | 31 #endif // NET_BASE_CERT_VERIFY_PROC_MAC_H_ |
| OLD | NEW |