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..1f3b20a5a317a1a2056d05f8edc7fccda4b5aecf 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,22 @@ 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. |
+// |completionHandler| on completion. |host| should be in DNS form |
Ryan Sleevi
2015/09/24 22:25:32
"DNS form" is still quite ambiguous :)
|host| sho
Eugene But (OOO till 7-30)
2015/09/25 00:28:10
Updated the comment. Do I need to add a DCHECK whi
|
+// (f.e. for "http://名がドメイン.com", it should be "xn--v8jxj3d1dzdz08w.com"). |
+// |completionHandler| cannot be null and will be called synchronously or |
+// asynchronously on the 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. |host| should be in DNS form. |
+- (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 |