Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: ios/web/web_state/wk_web_view_security_util.h

Issue 1357773002: WKWebView: Implemented recoverable SSL interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_coloring
Patch Set: Merged with parent CL Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 IOS_WEB_WEB_STATE_WK_WEB_VIEW_SECURITY_UTIL_H_ 5 #ifndef IOS_WEB_WEB_STATE_WK_WEB_VIEW_SECURITY_UTIL_H_
6 #define IOS_WEB_WEB_STATE_WK_WEB_VIEW_SECURITY_UTIL_H_ 6 #define IOS_WEB_WEB_STATE_WK_WEB_VIEW_SECURITY_UTIL_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #include <Security/Security.h> 9 #include <Security/Security.h>
10 10
11 #include "base/mac/scoped_cftyperef.h" 11 #include "base/mac/scoped_cftyperef.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "ios/web/public/security_style.h" 13 #include "ios/web/public/security_style.h"
14 14
15 namespace net { 15 namespace net {
16 class SSLInfo; 16 class SSLInfo;
17 class X509Certificate; 17 class X509Certificate;
18 } 18 }
19 19
20 namespace web { 20 namespace web {
21 21
22 // NSErrorPeerCertificateChainKey from NSError's userInfo dict. 22 // NSErrorPeerCertificateChainKey from NSError's userInfo dict.
23 extern NSString* const kNSErrorPeerCertificateChainKey; 23 extern NSString* const kNSErrorPeerCertificateChainKey;
24 // NSErrorFailingURLKey from NSError's userInfo dict.
25 extern NSString* const kNSErrorFailingURLKey;
24 26
25 // Creates a certificate from an array of SecCertificateRef objects. 27 // Creates a certificate from an array of SecCertificateRef objects.
26 // Returns null if |certs| is nil or empty. 28 // Returns null if |certs| is nil or empty.
27 scoped_refptr<net::X509Certificate> CreateCertFromChain(NSArray* certs); 29 scoped_refptr<net::X509Certificate> CreateCertFromChain(NSArray* certs);
28 30
29 // Creates a certificate from a SecTrustRef object. 31 // Creates a certificate from a SecTrustRef object.
30 // Returns null if trust is null or does not have any certs. 32 // Returns null if trust is null or does not have any certs.
31 scoped_refptr<net::X509Certificate> CreateCertFromTrust(SecTrustRef trust); 33 scoped_refptr<net::X509Certificate> CreateCertFromTrust(SecTrustRef trust);
32 34
33 // Creates server trust object from an array of SecCertificateRef objects. 35 // Creates server trust object from an array of SecCertificateRef objects.
(...skipping 13 matching lines...) Expand all
47 // responsible to ensure that given |error| is an SSL error by calling 49 // responsible to ensure that given |error| is an SSL error by calling
48 // |web::IsSSLError| function. 50 // |web::IsSSLError| function.
49 void GetSSLInfoFromWKWebViewSSLError(NSError* error, net::SSLInfo* ssl_info); 51 void GetSSLInfoFromWKWebViewSSLError(NSError* error, net::SSLInfo* ssl_info);
50 52
51 // Maps SecTrustResultType value to web::SecurityStyle. 53 // Maps SecTrustResultType value to web::SecurityStyle.
52 SecurityStyle GetSecurityStyleFromTrustResult(SecTrustResultType result); 54 SecurityStyle GetSecurityStyleFromTrustResult(SecTrustResultType result);
53 55
54 } // namespace web 56 } // namespace web
55 57
56 #endif // IOS_WEB_WEB_STATE_WK_WEB_VIEW_SECURITY_UTIL_H_ 58 #endif // IOS_WEB_WEB_STATE_WK_WEB_VIEW_SECURITY_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698