| Index: ios/web/net/crw_cert_verification_controller.h
|
| diff --git a/ios/web/net/crw_cert_verification_controller.h b/ios/web/net/crw_cert_verification_controller.h
|
| index 06ff635836431f0de9110a33a1eacc180028b721..4ed55805348774481d609a0c9477efb79c6af714 100644
|
| --- a/ios/web/net/crw_cert_verification_controller.h
|
| +++ b/ios/web/net/crw_cert_verification_controller.h
|
| @@ -8,6 +8,7 @@
|
| #import <Foundation/Foundation.h>
|
|
|
| #import "base/memory/ref_counted.h"
|
| +#include "ios/web/public/security_style.h"
|
| #include "net/cert/cert_status_flags.h"
|
|
|
| namespace net {
|
| @@ -32,6 +33,8 @@ typedef NS_ENUM(NSInteger, CertAcceptPolicy) {
|
|
|
| // Completion handler called by decidePolicyForCert:host:completionHandler:.
|
| typedef void (^PolicyDecisionHandler)(web::CertAcceptPolicy, net::CertStatus);
|
| +// Completion handler called by decidePolicyForCert:host:completionHandler:.
|
| +typedef void (^StatusQueryHandler)(web::SecurityStyle, net::CertStatus);
|
|
|
| } // namespace web
|
|
|
| @@ -49,14 +52,20 @@ typedef void (^PolicyDecisionHandler)(web::CertAcceptPolicy, net::CertStatus);
|
|
|
| // TODO(eugenebut): add API for:
|
| // - accepting bad SSL cert using CertPolicyCache
|
| -// - querying SSL cert status for Navigation Item
|
|
|
| // Decides the policy for the given |cert| for the given |host| and calls
|
| // |completionHandler| on completion. |completionHandler| cannot be null and
|
| // will be called synchronously or asynchronously on UI thread.
|
| - (void)decidePolicyForCert:(const scoped_refptr<net::X509Certificate>&)cert
|
| host:(NSString*)host
|
| - completionHandler:(web::PolicyDecisionHandler)handler;
|
| + completionHandler:(web::PolicyDecisionHandler)completionHandler;
|
| +
|
| +// Asynchronously returns web::SecurityStyle and net::CertStatus for the given
|
| +// |certificateChain| (an NSArray of SecSertificateRef objects) and |host|.
|
| +// |certificateChain| cannot be null or empty.
|
| +- (void)querySSLStatusForCertChain:(NSArray*)certChain
|
| + host:(NSString*)host
|
| + completionHandler:(web::StatusQueryHandler)completionHandler;
|
|
|
| // Cancels all pending verification requests. Completion handlers will not be
|
| // called after |shutDown| call. Must always be called before object's
|
|
|