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