| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_CERT_CERT_VERIFY_PROC_IOS_H_ | 5 #ifndef NET_CERT_CERT_VERIFY_PROC_IOS_H_ |
| 6 #define NET_CERT_CERT_VERIFY_PROC_IOS_H_ | 6 #define NET_CERT_CERT_VERIFY_PROC_IOS_H_ |
| 7 | 7 |
| 8 #include "net/cert/cert_verify_proc.h" | 8 #include "net/cert/cert_verify_proc.h" |
| 9 | 9 |
| 10 #include <Security/Security.h> |
| 11 |
| 10 namespace net { | 12 namespace net { |
| 11 | 13 |
| 12 // Performs certificate path construction and validation using iOS's | 14 // Performs certificate path construction and validation using iOS's |
| 13 // Security.framework. | 15 // Security.framework. |
| 14 class CertVerifyProcIOS : public CertVerifyProc { | 16 class CertVerifyProcIOS : public CertVerifyProc { |
| 15 public: | 17 public: |
| 16 CertVerifyProcIOS(); | 18 CertVerifyProcIOS(); |
| 17 | 19 |
| 20 // Returns error CertStatus from the given |trust| object. Returns |
| 21 // CERT_STATUS_INVALID if the trust is null. |
| 22 static CertStatus GetCertFailureStatusFromTrust(SecTrustRef trust); |
| 23 |
| 18 bool SupportsAdditionalTrustAnchors() const override; | 24 bool SupportsAdditionalTrustAnchors() const override; |
| 19 bool SupportsOCSPStapling() const override; | 25 bool SupportsOCSPStapling() const override; |
| 20 | 26 |
| 21 protected: | 27 protected: |
| 22 ~CertVerifyProcIOS() override; | 28 ~CertVerifyProcIOS() override; |
| 23 | 29 |
| 24 private: | 30 private: |
| 25 int VerifyInternal(X509Certificate* cert, | 31 int VerifyInternal(X509Certificate* cert, |
| 26 const std::string& hostname, | 32 const std::string& hostname, |
| 27 const std::string& ocsp_response, | 33 const std::string& ocsp_response, |
| 28 int flags, | 34 int flags, |
| 29 CRLSet* crl_set, | 35 CRLSet* crl_set, |
| 30 const CertificateList& additional_trust_anchors, | 36 const CertificateList& additional_trust_anchors, |
| 31 CertVerifyResult* verify_result) override; | 37 CertVerifyResult* verify_result) override; |
| 32 }; | 38 }; |
| 33 | 39 |
| 34 } // namespace net | 40 } // namespace net |
| 35 | 41 |
| 36 #endif // NET_CERT_CERT_VERIFY_PROC_IOS_H_ | 42 #endif // NET_CERT_CERT_VERIFY_PROC_IOS_H_ |
| OLD | NEW |