mirror of
https://github.com/datatheorem/TrustKit.git
synced 2026-05-17 12:50:35 +00:00
Commit generated documentation
This commit is contained in:
@@ -0,0 +1,323 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Classes Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Classes Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Classes Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Classes</h1>
|
||||
<p>The following classes are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TSKPinningValidator"></a>
|
||||
<a name="//apple_ref/objc/Class/TSKPinningValidator" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TSKPinningValidator">TSKPinningValidator</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>TSKPinningValidator</code> is a class for manually verifying a server’s identity against the global SSL pinning policy.</p>
|
||||
|
||||
<p>In specific scenarios, TrustKit cannot intercept outgoing SSL connections and automatically validate the server’s identity against the pinning policy:</p>
|
||||
|
||||
<ul>
|
||||
<li>All connections within an App that disables TrustKit’s network delegate swizzling by setting the <code><a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a></code> configuration key to <code>NO</code>.</li>
|
||||
<li>Connections that do not rely on the <code>NSURLConnection</code> or <code>NSURLSession</code> APIs:
|
||||
|
||||
<ul>
|
||||
<li><code>WKWebView</code> connections.</li>
|
||||
<li>Connections leveraging low-level network APIs (such as <code>NSStream</code>).</li>
|
||||
<li>Connections initiated using a third-party SSL library such as OpenSSL.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p>For these connections, pin validation must be manually triggered using one of the two available methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>evaluateTrust:forHostname:</code> which evaluates the server’s certificate chain against the global SSL pinning policy.</li>
|
||||
<li><code>handleChallenge:completionHandler:</code> a helper method to be used for implementing pinning validation in challenge handler methods within <code>NSURLSession</code> and <code>WKWebView</code> delegates.</li>
|
||||
</ul>
|
||||
|
||||
<a href="Classes/TSKPinningValidator.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TSKPinningValidator</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kt">TSKPinningValidator</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L60-L113">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20UserInfo%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification UserInfo Keys" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20UserInfo%20Keys">
|
||||
<h3 class="section-name">Pinning Validation Notification UserInfo Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit"></a>
|
||||
<a name="//apple_ref/objc/Class/TrustKit" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit">TrustKit</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>TrustKit</code> is a class for programmatically configuring the global SSL pinning policy within an App.</p>
|
||||
|
||||
<p>The policy can be set either by adding it to the App’s <em>Info.plist</em> under the <code>TSKConfiguration</code> key, or by programmatically supplying it using the <code>TrustKit</code> class described here. Throughout the App’s lifecycle, TrustKit can only be initialized once so only one of the two techniques should be used.</p>
|
||||
|
||||
<p>A TrustKit pinning policy is a dictionary which contains some global, App-wide settings as well as domain-specific configuration keys. The following table shows the keys and their types, and uses indentation to indicate structure:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>| Key | Type |
|
||||
|----------------------------------------------|------------|
|
||||
| `TSKSwizzleNetworkDelegates` | Boolean |
|
||||
| `TSKIgnorePinningForUserDefinedTrustAnchors` | Boolean |
|
||||
| `TSKPinnedDomains` | Dictionary |
|
||||
| __ `<domain-name-to-pin-as-string>` | Dictionary |
|
||||
| ____ `TSKPublicKeyHashes` | Array |
|
||||
| ____ `TSKPublicKeyAlgorithms` | Array |
|
||||
| ____ `TSKIncludeSubdomains` | Boolean |
|
||||
| ____ `TSKEnforcePinning` | Boolean |
|
||||
| ____ `TSKReportUris` | Array |
|
||||
| ____ `kTSKDisableDefaultReportUri` | Boolean |
|
||||
</code></pre>
|
||||
|
||||
<p>When setting the pinning policy programmatically, it has to be supplied to the <code>initializeWithConfiguration:</code> method as a dictionary. For example:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> NSDictionary *trustKitConfig =
|
||||
@{
|
||||
kTSKSwizzleNetworkDelegates: @NO,
|
||||
kTSKPinnedDomains : @{
|
||||
@"www.datatheorem.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"HXXQgxueCIU5TTLHob/bPbwcKOKw6DkfsTWYHbxbqTY=",
|
||||
@"0SDf3cRToyZJaMsoS17oF72VMavLxj/N7WBNasNuiR8="
|
||||
],
|
||||
kTSKEnforcePinning : @NO,
|
||||
kTSKReportUris : @[@"http://report.datatheorem.com/log_report"],
|
||||
},
|
||||
@"yahoo.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa4096],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"TQEtdMbmwFgYUifM4LDF+xgEtd0z69mPGmkp014d6ZY=",
|
||||
@"rFjc3wG7lTZe43zeYTvPq8k4xdDEutCmIhI5dn4oCeE=",
|
||||
],
|
||||
kTSKIncludeSubdomains : @YES
|
||||
}
|
||||
}};
|
||||
|
||||
[TrustKit initializeWithConfiguration:trustKitConfig];
|
||||
</code></pre>
|
||||
|
||||
<p>Similarly, TrustKit can be initialized in Swift:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> let trustKitConfig = [
|
||||
kTSKSwizzleNetworkDelegates: false,
|
||||
kTSKPinnedDomains: [
|
||||
"yahoo.com": [
|
||||
kTSKPublicKeyAlgorithms: [kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes: [
|
||||
"JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg=",
|
||||
"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="
|
||||
],]]]
|
||||
|
||||
TrustKit.initializeWithConfiguration(config)
|
||||
</code></pre>
|
||||
|
||||
<p>The various configuration keys that can be specified in the policy are described in the <q>Constants</q> section of the documentation.</p>
|
||||
|
||||
<p>Lastly, once TrustKit has been initialized, <code><a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a></code> notifications will be posted every time TrustKit validates the certificate chain of a server; these notifications provide some information about the validation that was done and can be used for example for performance measurement.</p>
|
||||
|
||||
<a href="Classes/TrustKit.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TrustKit</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kt">TrustKit</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L315-L353">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,367 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TSKPinningValidator Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/objc/Class/TSKPinningValidator" class="dashAnchor"></a>
|
||||
<a title="TSKPinningValidator Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="../img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
TSKPinningValidator Class Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>TSKPinningValidator</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TSKPinningValidator</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>TSKPinningValidator</code> is a class for manually verifying a server’s identity against the global SSL pinning policy.</p>
|
||||
|
||||
<p>In specific scenarios, TrustKit cannot intercept outgoing SSL connections and automatically validate the server’s identity against the pinning policy:</p>
|
||||
|
||||
<ul>
|
||||
<li>All connections within an App that disables TrustKit’s network delegate swizzling by setting the <code><a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a></code> configuration key to <code>NO</code>.</li>
|
||||
<li>Connections that do not rely on the <code>NSURLConnection</code> or <code>NSURLSession</code> APIs:
|
||||
|
||||
<ul>
|
||||
<li><code>WKWebView</code> connections.</li>
|
||||
<li>Connections leveraging low-level network APIs (such as <code>NSStream</code>).</li>
|
||||
<li>Connections initiated using a third-party SSL library such as OpenSSL.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p>For these connections, pin validation must be manually triggered using one of the two available methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>evaluateTrust:forHostname:</code> which evaluates the server’s certificate chain against the global SSL pinning policy.</li>
|
||||
<li><code>handleChallenge:completionHandler:</code> a helper method to be used for implementing pinning validation in challenge handler methods within <code>NSURLSession</code> and <code>WKWebView</code> delegates.</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Manual%20SSL%20Pinning%20Validation"></a>
|
||||
<a name="//apple_ref/objc/Section/Manual SSL Pinning Validation" class="dashAnchor"></a>
|
||||
<a href="#/Manual%20SSL%20Pinning%20Validation">
|
||||
<h3 class="section-name">Manual SSL Pinning Validation</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TSKPinningValidator(cm)evaluateTrust:forHostname:"></a>
|
||||
<a name="//apple_ref/objc/Method/+evaluateTrust:forHostname:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TSKPinningValidator(cm)evaluateTrust:forHostname:">+evaluateTrust:forHostname:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Evaluate the supplied server trust against the global SSL pinning policy previously configured. If the validation fails, a pin failure report will be sent.</p>
|
||||
|
||||
<p>When using the <code>NSURLSession</code> or <code>WKWebView</code> network APIs, the <code>handleChallenge:completionHandler:</code> method should be called instead, as it is simpler to use.</p>
|
||||
|
||||
<p>When using low-level network APIs (such as <code>NSStream</code>), instructions on how to retrieve the connection’s <code>serverTrust</code> are available at <a href="https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html">https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html</a> .</p>
|
||||
|
||||
<div class="aside aside-warning">
|
||||
<p class="aside-title">Warning</p>
|
||||
<p>If no SSL pinning policy was configured for the supplied <em>serverHostname</em>, this method has no effect and will return <code>TSKTrustDecisionDomainNotPinned</code> without validating the supplied <em>serverTrust</em> at all. This means that the server’s <em>serverTrust</em> object <strong>must</strong> be verified against the device’s trust store using <code>SecTrustEvaluate()</code>. Failing to do so will <strong>disable SSL certificate validation</strong>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p>@exception NSException Thrown when TrustKit has not been initialized with a pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n"><a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a></span><span class="p">)</span><span class="nf">evaluateTrust</span><span class="p">:(</span><span class="n">SecTrustRef</span> <span class="n">_Nonnull</span><span class="p">)</span><span class="nv">serverTrust</span>
|
||||
<span class="nf">forHostname</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span><span class="p">)</span><span class="nv">serverHostname</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">evaluateTrust</span><span class="p">(</span><span class="n">_</span> <span class="nv">serverTrust</span><span class="p">:</span> <span class="kt">SecTrust</span><span class="p">,</span> <span class="n">forHostname</span> <span class="nv">serverHostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>serverTrust</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The trust object representing the server’s certificate chain. The trust’s evaluation policy is always overridden using <code>SecTrustSetPolicies()</code> to ensure all the proper SSL checks (expiration, hostname validation, etc.) are enabled.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>serverHostname</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The hostname of the server whose identity is being validated.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>A <code><a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a></code> which describes whether the SSL connection should be allowed or blocked, based on the global pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L83">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TSKPinningValidator(cm)handleChallenge:completionHandler:"></a>
|
||||
<a name="//apple_ref/objc/Method/+handleChallenge:completionHandler:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TSKPinningValidator(cm)handleChallenge:completionHandler:">+handleChallenge:completionHandler:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Helper method for handling authentication challenges received within a <code>NSURLSessionDelegate</code>, <code>NSURLSessionTaskDelegate</code> or <code>WKNavigationDelegate</code>.</p>
|
||||
|
||||
<p>This method will evaluate the server trust within the authentication challenge against the global SSL pinning policy previously configured, and then call the <code>completionHandler</code> with the corresponding <code>disposition</code> and <code>credential</code>. For example, this method can be leveraged in a <code>WKNavigationDelegate</code> challenge handler method:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>- (void)webView:(WKWebView *)webView
|
||||
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
|
||||
completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition,
|
||||
NSURLCredential *credential))completionHandler
|
||||
{
|
||||
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust])
|
||||
{
|
||||
[TSKPinningValidator handleChallenge:challenge completionHandler:completionHandler];
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>@exception NSException Thrown when TrustKit has not been initialized with a pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="nf">handleChallenge</span><span class="p">:(</span><span class="n">NSURLAuthenticationChallenge</span> <span class="o">*</span><span class="n">_Nonnull</span><span class="p">)</span><span class="nv">challenge</span>
|
||||
<span class="nf">completionHandler</span><span class="p">:</span>
|
||||
<span class="p">(</span><span class="kt">void</span> <span class="p">(</span><span class="o">^</span><span class="n">_Nonnull</span><span class="p">)(</span><span class="n">NSURLSessionAuthChallengeDisposition</span><span class="p">,</span>
|
||||
<span class="n">NSURLCredential</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">))</span><span class="n">completionHandler</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">handle</span><span class="p">(</span><span class="n">_</span> <span class="nv">challenge</span><span class="p">:</span> <span class="kt">URLAuthenticationChallenge</span><span class="p">,</span> <span class="nv">completionHandler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">URLSession</span><span class="o">.</span><span class="kt">AuthChallengeDisposition</span><span class="p">,</span> <span class="kt">URLCredential</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>challenge</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The authentication challenge, supplied by the URL loading system to the delegate’s challenge handler method.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completionHandler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>A block to invoke to respond to the challenge, supplied by the URL loading system to the delegate’s challenge handler method.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p><code>YES</code> if the challenge was handled and the <code>completionHandler</code> was successfuly invoked. <code>NO</code> if the challenge could not be handled because it was not for server certificate validation (ie. the challenge’s <code>authenticationMethod</code> was not <code>NSURLAuthenticationMethodServerTrust</code>).</p>
|
||||
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L110-L112">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,381 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TrustKit Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/objc/Class/TrustKit" class="dashAnchor"></a>
|
||||
<a title="TrustKit Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="../img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
TrustKit Class Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>TrustKit</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TrustKit</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>TrustKit</code> is a class for programmatically configuring the global SSL pinning policy within an App.</p>
|
||||
|
||||
<p>The policy can be set either by adding it to the App’s <em>Info.plist</em> under the <code>TSKConfiguration</code> key, or by programmatically supplying it using the <code>TrustKit</code> class described here. Throughout the App’s lifecycle, TrustKit can only be initialized once so only one of the two techniques should be used.</p>
|
||||
|
||||
<p>A TrustKit pinning policy is a dictionary which contains some global, App-wide settings as well as domain-specific configuration keys. The following table shows the keys and their types, and uses indentation to indicate structure:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>| Key | Type |
|
||||
|----------------------------------------------|------------|
|
||||
| `TSKSwizzleNetworkDelegates` | Boolean |
|
||||
| `TSKIgnorePinningForUserDefinedTrustAnchors` | Boolean |
|
||||
| `TSKPinnedDomains` | Dictionary |
|
||||
| __ `<domain-name-to-pin-as-string>` | Dictionary |
|
||||
| ____ `TSKPublicKeyHashes` | Array |
|
||||
| ____ `TSKPublicKeyAlgorithms` | Array |
|
||||
| ____ `TSKIncludeSubdomains` | Boolean |
|
||||
| ____ `TSKEnforcePinning` | Boolean |
|
||||
| ____ `TSKReportUris` | Array |
|
||||
| ____ `kTSKDisableDefaultReportUri` | Boolean |
|
||||
</code></pre>
|
||||
|
||||
<p>When setting the pinning policy programmatically, it has to be supplied to the <code>initializeWithConfiguration:</code> method as a dictionary. For example:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> NSDictionary *trustKitConfig =
|
||||
@{
|
||||
kTSKSwizzleNetworkDelegates: @NO,
|
||||
kTSKPinnedDomains : @{
|
||||
@"www.datatheorem.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"HXXQgxueCIU5TTLHob/bPbwcKOKw6DkfsTWYHbxbqTY=",
|
||||
@"0SDf3cRToyZJaMsoS17oF72VMavLxj/N7WBNasNuiR8="
|
||||
],
|
||||
kTSKEnforcePinning : @NO,
|
||||
kTSKReportUris : @[@"http://report.datatheorem.com/log_report"],
|
||||
},
|
||||
@"yahoo.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa4096],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"TQEtdMbmwFgYUifM4LDF+xgEtd0z69mPGmkp014d6ZY=",
|
||||
@"rFjc3wG7lTZe43zeYTvPq8k4xdDEutCmIhI5dn4oCeE=",
|
||||
],
|
||||
kTSKIncludeSubdomains : @YES
|
||||
}
|
||||
}};
|
||||
|
||||
[TrustKit initializeWithConfiguration:trustKitConfig];
|
||||
</code></pre>
|
||||
|
||||
<p>Similarly, TrustKit can be initialized in Swift:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> let trustKitConfig = [
|
||||
kTSKSwizzleNetworkDelegates: false,
|
||||
kTSKPinnedDomains: [
|
||||
"yahoo.com": [
|
||||
kTSKPublicKeyAlgorithms: [kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes: [
|
||||
"JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg=",
|
||||
"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="
|
||||
],]]]
|
||||
|
||||
TrustKit.initializeWithConfiguration(config)
|
||||
</code></pre>
|
||||
|
||||
<p>The various configuration keys that can be specified in the policy are described in the <q>Constants</q> section of the documentation.</p>
|
||||
|
||||
<p>Lastly, once TrustKit has been initialized, <code><a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a></code> notifications will be posted every time TrustKit validates the certificate chain of a server; these notifications provide some information about the validation that was done and can be used for example for performance measurement.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Initialization"></a>
|
||||
<a name="//apple_ref/objc/Section/Initialization" class="dashAnchor"></a>
|
||||
<a href="#/Initialization">
|
||||
<h3 class="section-name">Initialization</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit(cm)initializeWithConfiguration:"></a>
|
||||
<a name="//apple_ref/objc/Method/+initializeWithConfiguration:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit(cm)initializeWithConfiguration:">+initializeWithConfiguration:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Initialize the global SSL pinning policy with the supplied configuration.</p>
|
||||
|
||||
<p>This method should be called as early as possible in the App’s lifecycle to ensure that the App’s very first SSL connections are validated by TrustKit. Once TrustKit has been initialized, notifications will be posted for any SSL pinning validation performed.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">initializeWithConfiguration</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSDictionary</span> <span class="o">*</span><span class="p">)</span><span class="nv">trustKitConfig</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">withConfiguration</span> <span class="nv">trustKitConfig</span><span class="p">:</span> <span class="p">[</span><span class="kt">AnyHashable</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">])</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>trustKitConfig</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>A dictionary containing various keys for configuring the global SSL pinning policy.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L330">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Current%20Configuration"></a>
|
||||
<a name="//apple_ref/objc/Section/Current Configuration" class="dashAnchor"></a>
|
||||
<a href="#/Current%20Configuration">
|
||||
<h3 class="section-name">Current Configuration</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit(cm)configuration"></a>
|
||||
<a name="//apple_ref/objc/Method/+configuration" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit(cm)configuration">+configuration</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Retrieve a copy of the global SSL pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">nullable</span> <span class="n">NSDictionary</span> <span class="o">*</span><span class="p">)</span><span class="n">configuration</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">configuration</span><span class="p">()</span> <span class="o">-></span> <span class="p">[</span><span class="kt">AnyHashable</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>A dictionary with a copy of the current TrustKit configuration, or <code>nil</code> if TrustKit has not been initialized.</p>
|
||||
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L342">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit(cm)setLoggerBlock:"></a>
|
||||
<a name="//apple_ref/objc/Method/+setLoggerBlock:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit(cm)setLoggerBlock:">+setLoggerBlock:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Set the global logger.</p>
|
||||
|
||||
<p>This method sets the global logger, used when TrustKit needs to display a message to the developer. </p>
|
||||
|
||||
<p>If a global logger is not set, the default logger will be used, which will print TrustKit log messages (using <code>NSLog()</code>) when the App is built in Debug mode. If the App was built for Release, the default logger will not print any messages at all.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">setLoggerBlock</span><span class="p">:(</span><span class="n">nonnull</span> <span class="kt">void</span> <span class="p">(</span><span class="o">^</span><span class="p">)(</span><span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span><span class="p">))</span><span class="nv">block</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">setLoggerBlock</span><span class="p">(</span><span class="n">_</span> <span class="nv">block</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">String</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L351">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,997 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Constants Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Constants Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Constants Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Constants</h1>
|
||||
<p>The following constants are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/TrustKit%20Version%20Number"></a>
|
||||
<a name="//apple_ref/objc/Section/TrustKit Version Number" class="dashAnchor"></a>
|
||||
<a href="#/TrustKit%20Version%20Number">
|
||||
<h3 class="section-name">TrustKit Version Number</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@TrustKitVersion"></a>
|
||||
<a name="//apple_ref/objc/Constant/TrustKitVersion" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The version of TrustKit, such as <q>1.4.0</q>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="n">NSString</span> <span class="o">*</span><span class="k">const</span> <span class="n">_Nonnull</span> <span class="n">TrustKitVersion</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">TrustKitVersion</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L23">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Global%20Configuration%20Keys%20-%20Required"></a>
|
||||
<a name="//apple_ref/objc/Section/Global Configuration Keys - Required" class="dashAnchor"></a>
|
||||
<a href="#/Global%20Configuration%20Keys%20-%20Required">
|
||||
<h3 class="section-name">Global Configuration Keys - Required</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKSwizzleNetworkDelegates"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKSwizzleNetworkDelegates" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, TrustKit will perform method swizzling on the App’s <code>NSURLConnection</code> and <code>NSURLSession</code> delegates in order to automatically add SSL pinning validation to the App’s connections.</p>
|
||||
|
||||
<p>Swizzling allows enabling pinning within an App without having to find and modify each and every instance of <code>NSURLConnection</code> or <code>NSURLSession</code> delegates.
|
||||
However, it should only be enabled for simple Apps, as it may not work properly in several scenarios including:</p>
|
||||
|
||||
<ul>
|
||||
<li>Apps with complex connection delegates, for example to handle client authentication via certificates or basic authentication.</li>
|
||||
<li>Apps where method swizzling of the connection delegates is already performed by another module or library (such as Analytics SDKs).</li>
|
||||
<li>Apps that do no use <code>NSURLSession</code> or <code>NSURLConnection</code> for their connections.</li>
|
||||
</ul>
|
||||
|
||||
<p>In such scenarios or if the developer wants a tigher control on the App’s networking behavior, <code>kTSKSwizzleNetworkDelegates</code> should be set to <code>NO</code>; the developer should then manually add pinning validation to the App’s authentication handlers.</p>
|
||||
|
||||
<p>See the <code><a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a></code> class for instructions on how to do so.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKSwizzleNetworkDelegates</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKSwizzleNetworkDelegates</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L58">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKPinnedDomains"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKPinnedDomains" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A dictionary with domains (such as <em><a href="http://www.domain.com">www.domain.com</a></em>) as keys and dictionaries as values.</p>
|
||||
|
||||
<p>Each entry should contain domain-specific settings for performing pinning validation when connecting to the domain, including for example the domain’s public key hashes. A list of all domain-specific keys is available in the <q>Domain-specific Keys</q> sections.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKPinnedDomains</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKPinnedDomains</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L66">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Global%20Configuration%20Keys%20-%20Optional"></a>
|
||||
<a name="//apple_ref/objc/Section/Global Configuration Keys - Optional" class="dashAnchor"></a>
|
||||
<a href="#/Global%20Configuration%20Keys%20-%20Optional">
|
||||
<h3 class="section-name">Global Configuration Keys - Optional</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKIgnorePinningForUserDefinedTrustAnchors"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKIgnorePinningForUserDefinedTrustAnchors" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, pinning validation will be skipped if the server’s certificate chain terminates at a user-defined trust anchor (such as a root CA that isn’t part of OS X’s default trust store) and no pin failure reports will be sent; default value is <code>YES</code>.</p>
|
||||
|
||||
<p>This is useful for allowing SSL connections through corporate proxies or firewalls. See <q>How does key pinning interact with local proxies and filters?</q> within the Chromium security FAQ at <a href="https://www.chromium.org/Home/chromium-security/security-faq">https://www.chromium.org/Home/chromium-security/security-faq</a> for more information.</p>
|
||||
|
||||
<p>Only available on macOS.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKIgnorePinningForUserDefinedTrustAnchors</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKIgnorePinningForUserDefinedTrustAnchors</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L80">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Domain-Specific%20Configuration%20Keys%20-%20Required"></a>
|
||||
<a name="//apple_ref/objc/Section/Domain-Specific Configuration Keys - Required" class="dashAnchor"></a>
|
||||
<a href="#/Domain-Specific%20Configuration%20Keys%20-%20Required">
|
||||
<h3 class="section-name">Domain-Specific Configuration Keys - Required</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKPublicKeyHashes"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKPublicKeyHashes" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>An array of SSL pins, where each pin is the base64-encoded SHA-256 hash of a certificate’s Subject Public Key Info.</p>
|
||||
|
||||
<p>TrustKit will verify that at least one of the specified pins is found in the server’s evaluated certificate chain.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKPublicKeyHashes</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKPublicKeyHashes</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L90">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKPublicKeyAlgorithms"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKPublicKeyAlgorithms" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>An array of <code><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></code> constants to specify the public key algorithms for the keys to be pinned.</p>
|
||||
|
||||
<p>TrustKit requires this information in order to compute SSL pins when validating a server’s certificate chain, because the <code>Security</code> framework does not provide APIs to extract the key’s algorithm from an SSL certificate. To minimize the performance impact of Trustkit, only one algorithm should be enabled.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKPublicKeyAlgorithms</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKPublicKeyAlgorithms</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L98">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Domain-Specific%20Configuration%20Keys%20-%20Optional"></a>
|
||||
<a name="//apple_ref/objc/Section/Domain-Specific Configuration Keys - Optional" class="dashAnchor"></a>
|
||||
<a href="#/Domain-Specific%20Configuration%20Keys%20-%20Optional">
|
||||
<h3 class="section-name">Domain-Specific Configuration Keys - Optional</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKEnforcePinning"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKEnforcePinning" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>NO</code>, TrustKit will not block SSL connections that caused a pin or certificate validation error; default value is <code>YES</code>.</p>
|
||||
|
||||
<p>When a pinning failure occurs, pin failure reports will always be sent to the configured report URIs regardless of the value of <code>kTSKEnforcePinning</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKEnforcePinning</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKEnforcePinning</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L108">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKIncludeSubdomains"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKIncludeSubdomains" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, also pin all the subdomains of the specified domain; default value is <code>NO</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKIncludeSubdomains</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKIncludeSubdomains</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L114">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKReportUris"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKReportUris" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>An array of URLs to which pin validation failures should be reported.</p>
|
||||
|
||||
<p>To minimize the performance impact of sending reports on each validation failure, the reports are uploaded using the background transfer service and are also rate-limited to one per day and per type of failure. For HTTPS report URLs, the HTTPS connections will ignore the SSL pinning policy and use the default certificate validation mechanisms, in order to maximize the chance of the reports reaching the server. The format of the reports is similar to the one described in RFC 7469 for the HPKP specification:</p>
|
||||
|
||||
<p>{
|
||||
<q>app-bundle-id</q>:<q>com.example.ABC</q>,
|
||||
<q>app-version</q>:<q>1.0</q>,
|
||||
<q>app-vendor-id</q>:<q>599F9C00-92DC-4B5C-9464-7971F01F8370</q>,
|
||||
<q>date-time</q>: <q>2015-07-10T20:03:14Z</q>,
|
||||
<q>hostname</q>: <q>mail.example.com</q>,
|
||||
<q>port</q>: 0,
|
||||
<q>include-subdomains</q>: true,
|
||||
<q>noted-hostname</q>: <q>example.com</q>,
|
||||
<q>validated-certificate-chain</q>: [
|
||||
pem1, … pemN
|
||||
],
|
||||
<q>known-pins</q>: [
|
||||
<q>pin-sha256=\</q>d6qzRu9zOECb90Uez27xWltNsj0e1Md7GkYYkVoZWmM=\<q>,
|
||||
“pin-sha256=“E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=\</q>
|
||||
],
|
||||
<q>validation-result</q>:1
|
||||
}</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKReportUris</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKReportUris</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L141">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKDisableDefaultReportUri"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKDisableDefaultReportUri" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, the default report URL for sending pin failure reports will be disabled; default value is <code>NO</code>.</p>
|
||||
|
||||
<p>By default, pin failure reports are sent to a report server hosted by Data Theorem, for detecting potential CA compromises and man-in-the-middle attacks, as well as providing a free dashboard for developers; email <a href="mailto:info@datatheorem.com">info@datatheorem.com</a> if you’d like a dashboard for your App. Only pin failure reports are sent, which contain the App’s bundle ID, the IDFV, and the server’s hostname and certificate chain that failed validation.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKDisableDefaultReportUri</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKDisableDefaultReportUri</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L149">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Supported%20Public%20Key%20Algorithm%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Supported Public Key Algorithm Keys" class="dashAnchor"></a>
|
||||
<a href="#/Supported%20Public%20Key%20Algorithm%20Keys">
|
||||
<h3 class="section-name">Supported Public Key Algorithm Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKAlgorithmRsa2048"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa2048" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>RSA 2048.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKAlgorithmRsa2048</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKAlgorithmRsa2048</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L170">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKAlgorithmRsa4096"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa4096" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>RSA 4096.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKAlgorithmRsa4096</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKAlgorithmRsa4096</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L176">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKAlgorithmEcDsaSecp256r1"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKAlgorithmEcDsaSecp256r1" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>ECDSA with secp256r1 curve.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKAlgorithmEcDsaSecp256r1</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKAlgorithmEcDsaSecp256r1</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L182">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20Name"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification Name" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20Name">
|
||||
<h3 class="section-name">Pinning Validation Notification Name</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationCompletedNotification"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationCompletedNotification" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The <code>name</code> of the notification to be posted for every request that is going through TrustKit’s pinning validation mechanism.</p>
|
||||
|
||||
<p>Once TrustKit has been initialized, notifications will be posted with this <code>name</code> every time TrustKit validates the certificate chain for a server configured in the SSL pinning policy; if the server’s hostname does not have an entry in the pinning policy, no notifications get posted as no pinning validation was performed.</p>
|
||||
|
||||
<p>These notifications can be used for performance measurement or to act upon any pinning validation performed by TrustKit (for example to customize the reporting mechanism). The notifications provide details about TrustKit’s inner-workings which most Apps should not need to process. Hence, these notifications can be ignored unless the App requires some advanced customization in regards to pinning validation.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">kTSKValidationCompletedNotification</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">static</span> <span class="k">let</span> <span class="nv">tskValidationCompleted</span><span class="p">:</span> <span class="kt">NSNotification</span><span class="o">.</span><span class="kt">Name</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L195">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20UserInfo%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification UserInfo Keys" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20UserInfo%20Keys">
|
||||
<h3 class="section-name">Pinning Validation Notification UserInfo Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationDurationNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationDurationNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The time in seconds it took for the SSL pinning validation to be performed.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationDurationNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationDurationNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L209">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationResultNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationResultNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The <code>TSKPinningValidationResult</code> returned when validating the server’s certificate chain, which represents the result of evaluating the certificate chain against the configured SSL pins for this server.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationResultNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationResultNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L215">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationDecisionNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationDecisionNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The <code><a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a></code> returned when validating the certificate’s chain, which describes whether the connection should be blocked or allowed, based on the <code>TSKPinningValidationResult</code> returned when evaluating the server’s certificate chain and the SSL pining policy configured for this server.</p>
|
||||
|
||||
<p>For example, the pinning validation could have failed (returning <code>TSKPinningValidationFailed</code>) but the policy might be set to ignore pinning validation failures for this server, thereby returning <code>TSKTrustDecisionShouldAllowConnection</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationDecisionNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationDecisionNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L222">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationCertificateChainNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationCertificateChainNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The certificate chain returned by the server as an array of PEM-formatted certificates.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationCertificateChainNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationCertificateChainNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L227">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationNotedHostnameNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationNotedHostnameNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The entry within the SSL pinning configuration that was used as the pinning policy for the server being validated. It will be the same as the <code><a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a></code> entry unless the server is a subdomain of a domain configured in the pinning policy with <code><a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a></code> enabled. The corresponding pinning configuration that was used for validation can be retrieved using:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>NSString *notedHostname = userInfo[kTSKValidationNotedHostnameNotificationKey];
|
||||
NSDictionary *hostnameConfiguration = [TrustKit configuration][kTSKPinnedDomains][notedHostname];
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationNotedHostnameNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationNotedHostnameNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L235">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationServerHostnameNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationServerHostnameNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The hostname of the server SSL pinning validation was performed against.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationServerHostnameNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationServerHostnameNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L240">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Enums Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Enums Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Enums Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Enums</h1>
|
||||
<p>The following enums are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision"></a>
|
||||
<a name="//apple_ref/objc/Enum/TSKTrustDecision" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision">TSKTrustDecision</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Possible return values when verifying a server’s identity against the global SSL pinning policy using <code><a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a></code>.</p>
|
||||
|
||||
<a href="Enums/TSKTrustDecision.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">enum</span> <span class="n">TSKTrustDecision</span> <span class="o">:</span> <span class="n">NSInteger</span> <span class="p">{}</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">enum</span> <span class="kt">TSKTrustDecision</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L20-L39">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,270 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TSKTrustDecision Enum Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/objc/Enum/TSKTrustDecision" class="dashAnchor"></a>
|
||||
<a title="TSKTrustDecision Enum Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="../img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
TSKTrustDecision Enum Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>TSKTrustDecision</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="k">enum</span> <span class="n">TSKTrustDecision</span> <span class="o">:</span> <span class="n">NSInteger</span> <span class="p">{}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Possible return values when verifying a server’s identity against the global SSL pinning policy using <code><a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a></code>.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision@TSKTrustDecisionShouldAllowConnection"></a>
|
||||
<a name="//apple_ref/objc/Case/TSKTrustDecisionShouldAllowConnection" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision@TSKTrustDecisionShouldAllowConnection">TSKTrustDecisionShouldAllowConnection</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Based on the server’s certificate chain and the global pinning policy for this domain, the SSL connection should be allowed.
|
||||
This return value does not necessarily mean that the pinning validation succeded (for example if <code><a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a></code> was set to <code>NO</code> for this domain). If a pinning validation failure occured and if a report URI was configured, a pin failure report was sent.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="n">TSKTrustDecisionShouldAllowConnection</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">shouldAllowConnection</span> <span class="o">=</span> <span class="mi">0</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L26">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision@TSKTrustDecisionShouldBlockConnection"></a>
|
||||
<a name="//apple_ref/objc/Case/TSKTrustDecisionShouldBlockConnection" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision@TSKTrustDecisionShouldBlockConnection">TSKTrustDecisionShouldBlockConnection</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Based on the server’s certificate chain and the global pinning policy for this domain, the SSL connection should be blocked.
|
||||
A pinning validation failure occured and if a report URI was configured, a pin failure report was sent.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="n">TSKTrustDecisionShouldBlockConnection</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">shouldBlockConnection</span> <span class="o">=</span> <span class="mi">1</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L32">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision@TSKTrustDecisionDomainNotPinned"></a>
|
||||
<a name="//apple_ref/objc/Case/TSKTrustDecisionDomainNotPinned" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision@TSKTrustDecisionDomainNotPinned">TSKTrustDecisionDomainNotPinned</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>No pinning policy was configured for this domain and TrustKit did not validate the server’s identity.
|
||||
Because this will happen in an authentication handler, it means that the server’s <em>serverTrust</em> object <strong>needs</strong> to be verified against the device’s trust store using <code>SecTrustEvaluate()</code>. Failing to do so will <strong>disable SSL certificate validation</strong>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="n">TSKTrustDecisionDomainNotPinned</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">domainNotPinned</span> <span class="o">=</span> <span class="mi">2</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L38">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,330 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Type Definitions Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Type Definitions Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Type Definitions Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Type Definitions</h1>
|
||||
<p>The following type definitions are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Configuration%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Configuration Keys" class="dashAnchor"></a>
|
||||
<a href="#/Configuration%20Keys">
|
||||
<h3 class="section-name">Configuration Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKGlobalConfigurationKey"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKGlobalConfigurationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A global, App-wide configuration key that can be set in the pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKGlobalConfigurationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKGlobalConfigurationKey</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L32">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKDomainConfigurationKey"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKDomainConfigurationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A domain-specific configuration key (to defined for a domain under the <code><a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a></code> key) that can be set in the pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKDomainConfigurationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKDomainConfigurationKey</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L38">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Supported%20Public%20Key%20Algorithm%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Supported Public Key Algorithm Keys" class="dashAnchor"></a>
|
||||
<a href="#/Supported%20Public%20Key%20Algorithm%20Keys">
|
||||
<h3 class="section-name">Supported Public Key Algorithm Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKSupportedAlgorithm"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKSupportedAlgorithm" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A public key algorithm supported by TrustKit for computing SSL pins: </p>
|
||||
|
||||
<ul>
|
||||
<li><code><a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a></code></li>
|
||||
<li><code><a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a></code></li>
|
||||
<li><code><a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a></code></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKSupportedAlgorithm</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKSupportedAlgorithm</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L164">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20UserInfo%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification UserInfo Keys" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20UserInfo%20Keys">
|
||||
<h3 class="section-name">Pinning Validation Notification UserInfo Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKNotificationUserInfoKey"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKNotificationUserInfoKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A key to be used to retrieve data about the pinning validation that occured, from the <code>userInfo</code> dictionary attached to a <code><a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a></code> notification.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKNotificationUserInfoKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKNotificationUserInfoKey</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L203">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,200 @@
|
||||
/* Credit to https://gist.github.com/wataru420/2048287 */
|
||||
.highlight {
|
||||
/* Comment */
|
||||
/* Error */
|
||||
/* Keyword */
|
||||
/* Operator */
|
||||
/* Comment.Multiline */
|
||||
/* Comment.Preproc */
|
||||
/* Comment.Single */
|
||||
/* Comment.Special */
|
||||
/* Generic.Deleted */
|
||||
/* Generic.Deleted.Specific */
|
||||
/* Generic.Emph */
|
||||
/* Generic.Error */
|
||||
/* Generic.Heading */
|
||||
/* Generic.Inserted */
|
||||
/* Generic.Inserted.Specific */
|
||||
/* Generic.Output */
|
||||
/* Generic.Prompt */
|
||||
/* Generic.Strong */
|
||||
/* Generic.Subheading */
|
||||
/* Generic.Traceback */
|
||||
/* Keyword.Constant */
|
||||
/* Keyword.Declaration */
|
||||
/* Keyword.Pseudo */
|
||||
/* Keyword.Reserved */
|
||||
/* Keyword.Type */
|
||||
/* Literal.Number */
|
||||
/* Literal.String */
|
||||
/* Name.Attribute */
|
||||
/* Name.Builtin */
|
||||
/* Name.Class */
|
||||
/* Name.Constant */
|
||||
/* Name.Entity */
|
||||
/* Name.Exception */
|
||||
/* Name.Function */
|
||||
/* Name.Namespace */
|
||||
/* Name.Tag */
|
||||
/* Name.Variable */
|
||||
/* Operator.Word */
|
||||
/* Text.Whitespace */
|
||||
/* Literal.Number.Float */
|
||||
/* Literal.Number.Hex */
|
||||
/* Literal.Number.Integer */
|
||||
/* Literal.Number.Oct */
|
||||
/* Literal.String.Backtick */
|
||||
/* Literal.String.Char */
|
||||
/* Literal.String.Doc */
|
||||
/* Literal.String.Double */
|
||||
/* Literal.String.Escape */
|
||||
/* Literal.String.Heredoc */
|
||||
/* Literal.String.Interpol */
|
||||
/* Literal.String.Other */
|
||||
/* Literal.String.Regex */
|
||||
/* Literal.String.Single */
|
||||
/* Literal.String.Symbol */
|
||||
/* Name.Builtin.Pseudo */
|
||||
/* Name.Variable.Class */
|
||||
/* Name.Variable.Global */
|
||||
/* Name.Variable.Instance */
|
||||
/* Literal.Number.Integer.Long */ }
|
||||
.highlight .c {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2; }
|
||||
.highlight .k {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .o {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .cm {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cp {
|
||||
color: #999999;
|
||||
font-weight: bold; }
|
||||
.highlight .c1 {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cs {
|
||||
color: #999999;
|
||||
font-weight: bold;
|
||||
font-style: italic; }
|
||||
.highlight .gd {
|
||||
color: #000000;
|
||||
background-color: #ffdddd; }
|
||||
.highlight .gd .x {
|
||||
color: #000000;
|
||||
background-color: #ffaaaa; }
|
||||
.highlight .ge {
|
||||
color: #000000;
|
||||
font-style: italic; }
|
||||
.highlight .gr {
|
||||
color: #aa0000; }
|
||||
.highlight .gh {
|
||||
color: #999999; }
|
||||
.highlight .gi {
|
||||
color: #000000;
|
||||
background-color: #ddffdd; }
|
||||
.highlight .gi .x {
|
||||
color: #000000;
|
||||
background-color: #aaffaa; }
|
||||
.highlight .go {
|
||||
color: #888888; }
|
||||
.highlight .gp {
|
||||
color: #555555; }
|
||||
.highlight .gs {
|
||||
font-weight: bold; }
|
||||
.highlight .gu {
|
||||
color: #aaaaaa; }
|
||||
.highlight .gt {
|
||||
color: #aa0000; }
|
||||
.highlight .kc {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kd {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kp {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kr {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kt {
|
||||
color: #445588; }
|
||||
.highlight .m {
|
||||
color: #009999; }
|
||||
.highlight .s {
|
||||
color: #d14; }
|
||||
.highlight .na {
|
||||
color: #008080; }
|
||||
.highlight .nb {
|
||||
color: #0086B3; }
|
||||
.highlight .nc {
|
||||
color: #445588;
|
||||
font-weight: bold; }
|
||||
.highlight .no {
|
||||
color: #008080; }
|
||||
.highlight .ni {
|
||||
color: #800080; }
|
||||
.highlight .ne {
|
||||
color: #990000;
|
||||
font-weight: bold; }
|
||||
.highlight .nf {
|
||||
color: #990000; }
|
||||
.highlight .nn {
|
||||
color: #555555; }
|
||||
.highlight .nt {
|
||||
color: #000080; }
|
||||
.highlight .nv {
|
||||
color: #008080; }
|
||||
.highlight .ow {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .w {
|
||||
color: #bbbbbb; }
|
||||
.highlight .mf {
|
||||
color: #009999; }
|
||||
.highlight .mh {
|
||||
color: #009999; }
|
||||
.highlight .mi {
|
||||
color: #009999; }
|
||||
.highlight .mo {
|
||||
color: #009999; }
|
||||
.highlight .sb {
|
||||
color: #d14; }
|
||||
.highlight .sc {
|
||||
color: #d14; }
|
||||
.highlight .sd {
|
||||
color: #d14; }
|
||||
.highlight .s2 {
|
||||
color: #d14; }
|
||||
.highlight .se {
|
||||
color: #d14; }
|
||||
.highlight .sh {
|
||||
color: #d14; }
|
||||
.highlight .si {
|
||||
color: #d14; }
|
||||
.highlight .sx {
|
||||
color: #d14; }
|
||||
.highlight .sr {
|
||||
color: #009926; }
|
||||
.highlight .s1 {
|
||||
color: #d14; }
|
||||
.highlight .ss {
|
||||
color: #990073; }
|
||||
.highlight .bp {
|
||||
color: #999999; }
|
||||
.highlight .vc {
|
||||
color: #008080; }
|
||||
.highlight .vg {
|
||||
color: #008080; }
|
||||
.highlight .vi {
|
||||
color: #008080; }
|
||||
.highlight .il {
|
||||
color: #009999; }
|
||||
@@ -0,0 +1,332 @@
|
||||
html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline; }
|
||||
|
||||
body {
|
||||
background-color: #f2f2f2;
|
||||
font-family: Helvetica, freesans, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
word-wrap: break-word; }
|
||||
|
||||
h1, h2, h3 {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.3em;
|
||||
font-weight: 100;
|
||||
color: black; }
|
||||
|
||||
h1 {
|
||||
font-size: 2.5em; }
|
||||
|
||||
h2 {
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid #e2e2e2; }
|
||||
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
margin-top: 21px; }
|
||||
|
||||
h5 {
|
||||
font-size: 1.1em; }
|
||||
|
||||
h6 {
|
||||
font-size: 1.1em;
|
||||
color: #777; }
|
||||
|
||||
.section-name {
|
||||
color: gray;
|
||||
display: block;
|
||||
font-family: Helvetica;
|
||||
font-size: 22px;
|
||||
font-weight: 100;
|
||||
margin-bottom: 15px; }
|
||||
|
||||
pre, code {
|
||||
font: 0.95em Menlo, monospace;
|
||||
color: #777;
|
||||
word-wrap: normal; }
|
||||
|
||||
p code, li code {
|
||||
background-color: #eee;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px; }
|
||||
|
||||
a {
|
||||
color: #0088cc;
|
||||
text-decoration: none; }
|
||||
|
||||
ul {
|
||||
padding-left: 15px; }
|
||||
|
||||
li {
|
||||
line-height: 1.8em; }
|
||||
|
||||
img {
|
||||
max-width: 100%; }
|
||||
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
padding: 0 10px;
|
||||
border-left: 4px solid #ccc; }
|
||||
|
||||
.content-wrapper {
|
||||
margin: 0 auto;
|
||||
width: 980px; }
|
||||
|
||||
header {
|
||||
font-size: 0.85em;
|
||||
line-height: 26px;
|
||||
background-color: #414141;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1; }
|
||||
header img {
|
||||
padding-right: 6px;
|
||||
vertical-align: -4px;
|
||||
height: 16px; }
|
||||
header a {
|
||||
color: #fff; }
|
||||
header p {
|
||||
float: left;
|
||||
color: #999; }
|
||||
header .header-right {
|
||||
float: right;
|
||||
margin-left: 16px; }
|
||||
|
||||
#breadcrumbs {
|
||||
background-color: #f2f2f2;
|
||||
height: 27px;
|
||||
padding-top: 17px;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
margin-top: 26px; }
|
||||
#breadcrumbs #carat {
|
||||
height: 10px;
|
||||
margin: 0 5px; }
|
||||
|
||||
.sidebar {
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #e2e2e2;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
bottom: 0;
|
||||
width: 230px;
|
||||
word-wrap: normal; }
|
||||
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
background: #fff;
|
||||
padding-left: 0; }
|
||||
|
||||
.nav-group-name {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
font-size: 1.1em;
|
||||
font-weight: 100;
|
||||
padding: 15px 0 15px 20px; }
|
||||
.nav-group-name > a {
|
||||
color: #333; }
|
||||
|
||||
.nav-group-tasks {
|
||||
margin-top: 5px; }
|
||||
|
||||
.nav-group-task {
|
||||
font-size: 0.9em;
|
||||
list-style-type: none;
|
||||
white-space: nowrap; }
|
||||
.nav-group-task a {
|
||||
color: #888; }
|
||||
|
||||
.main-content {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e2e2e2;
|
||||
margin-left: 246px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
padding-bottom: 60px;
|
||||
top: 70px;
|
||||
width: 734px; }
|
||||
.main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
|
||||
margin-bottom: 1em; }
|
||||
.main-content p {
|
||||
line-height: 1.8em; }
|
||||
.main-content section .section:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
.main-content section .task-group-section .task-group:first-of-type {
|
||||
padding-top: 10px; }
|
||||
.main-content section .task-group-section .task-group:first-of-type .section-name {
|
||||
padding-top: 15px; }
|
||||
|
||||
.section {
|
||||
padding: 0 25px; }
|
||||
|
||||
.highlight {
|
||||
background-color: #eee;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 4px;
|
||||
overflow-x: auto; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
padding: 0 40px 40px 0;
|
||||
margin-bottom: -25px;
|
||||
background-color: transparent;
|
||||
border: none; }
|
||||
|
||||
.section-name {
|
||||
margin: 0;
|
||||
margin-left: 18px; }
|
||||
|
||||
.task-group-section {
|
||||
padding-left: 6px;
|
||||
border-top: 1px solid #e2e2e2; }
|
||||
|
||||
.task-group {
|
||||
padding-top: 0px; }
|
||||
|
||||
.task-name-container a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
|
||||
.item {
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
list-style-type: none; }
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
.item code {
|
||||
background-color: transparent;
|
||||
padding: 0; }
|
||||
.item .token {
|
||||
padding-left: 3px;
|
||||
margin-left: 15px;
|
||||
font-size: 11.9px; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
color: gray;
|
||||
font-style: italic; }
|
||||
|
||||
.pointer-container {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -23px;
|
||||
padding-bottom: 13px;
|
||||
position: relative;
|
||||
width: 110%; }
|
||||
|
||||
.pointer {
|
||||
background: #f9f9f9;
|
||||
border-left: 1px solid #e2e2e2;
|
||||
border-top: 1px solid #e2e2e2;
|
||||
height: 12px;
|
||||
left: 21px;
|
||||
top: -7px;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
position: absolute;
|
||||
width: 12px; }
|
||||
|
||||
.height-container {
|
||||
display: none;
|
||||
left: -25px;
|
||||
padding: 0 25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden; }
|
||||
.height-container .section {
|
||||
background: #f9f9f9;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px; }
|
||||
|
||||
.aside, .language {
|
||||
padding: 6px 12px;
|
||||
margin: 12px 0;
|
||||
border-left: 5px solid #dddddd;
|
||||
overflow-y: hidden; }
|
||||
.aside .aside-title, .language .aside-title {
|
||||
font-size: 9px;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
padding-bottom: 0;
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
-webkit-user-select: none; }
|
||||
.aside p:last-child, .language p:last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.language {
|
||||
border-left: 5px solid #cde9f4; }
|
||||
.language .aside-title {
|
||||
color: #4b8afb; }
|
||||
|
||||
.aside-warning {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
border-collapse: collapse;
|
||||
width: 100%; }
|
||||
.graybox p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
min-width: 50px; }
|
||||
.graybox td {
|
||||
border: 1px solid #e2e2e2;
|
||||
padding: 5px 25px 5px 10px;
|
||||
vertical-align: middle; }
|
||||
.graybox tr td:first-of-type {
|
||||
text-align: right;
|
||||
padding: 7px;
|
||||
vertical-align: top;
|
||||
word-break: normal;
|
||||
width: 40px; }
|
||||
|
||||
.slightly-smaller {
|
||||
font-size: 0.9em; }
|
||||
|
||||
#footer {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
margin-left: 25px; }
|
||||
#footer p {
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
font-size: 0.8em; }
|
||||
|
||||
html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
|
||||
display: none; }
|
||||
html.dash .main-content {
|
||||
width: 980px;
|
||||
margin-left: 0;
|
||||
border: none;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
padding-bottom: 0; }
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
html.dash .item .token {
|
||||
margin-left: 0; }
|
||||
html.dash .content-wrapper {
|
||||
width: auto; }
|
||||
html.dash #footer {
|
||||
position: static; }
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.jazzy.trustkit</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>TrustKit</string>
|
||||
<key>DocSetPlatformFamily</key>
|
||||
<string>trustkit</string>
|
||||
<key>isDashDocset</key>
|
||||
<true/>
|
||||
<key>dashIndexFilePath</key>
|
||||
<string>index.html</string>
|
||||
<key>isJavaScriptEnabled</key>
|
||||
<true/>
|
||||
<key>DashDocSetFamily</key>
|
||||
<string>dashtoc</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,323 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Classes Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Classes Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Classes Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Classes</h1>
|
||||
<p>The following classes are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TSKPinningValidator"></a>
|
||||
<a name="//apple_ref/objc/Class/TSKPinningValidator" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TSKPinningValidator">TSKPinningValidator</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>TSKPinningValidator</code> is a class for manually verifying a server’s identity against the global SSL pinning policy.</p>
|
||||
|
||||
<p>In specific scenarios, TrustKit cannot intercept outgoing SSL connections and automatically validate the server’s identity against the pinning policy:</p>
|
||||
|
||||
<ul>
|
||||
<li>All connections within an App that disables TrustKit’s network delegate swizzling by setting the <code><a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a></code> configuration key to <code>NO</code>.</li>
|
||||
<li>Connections that do not rely on the <code>NSURLConnection</code> or <code>NSURLSession</code> APIs:
|
||||
|
||||
<ul>
|
||||
<li><code>WKWebView</code> connections.</li>
|
||||
<li>Connections leveraging low-level network APIs (such as <code>NSStream</code>).</li>
|
||||
<li>Connections initiated using a third-party SSL library such as OpenSSL.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p>For these connections, pin validation must be manually triggered using one of the two available methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>evaluateTrust:forHostname:</code> which evaluates the server’s certificate chain against the global SSL pinning policy.</li>
|
||||
<li><code>handleChallenge:completionHandler:</code> a helper method to be used for implementing pinning validation in challenge handler methods within <code>NSURLSession</code> and <code>WKWebView</code> delegates.</li>
|
||||
</ul>
|
||||
|
||||
<a href="Classes/TSKPinningValidator.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TSKPinningValidator</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kt">TSKPinningValidator</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L60-L113">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20UserInfo%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification UserInfo Keys" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20UserInfo%20Keys">
|
||||
<h3 class="section-name">Pinning Validation Notification UserInfo Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit"></a>
|
||||
<a name="//apple_ref/objc/Class/TrustKit" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit">TrustKit</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>TrustKit</code> is a class for programmatically configuring the global SSL pinning policy within an App.</p>
|
||||
|
||||
<p>The policy can be set either by adding it to the App’s <em>Info.plist</em> under the <code>TSKConfiguration</code> key, or by programmatically supplying it using the <code>TrustKit</code> class described here. Throughout the App’s lifecycle, TrustKit can only be initialized once so only one of the two techniques should be used.</p>
|
||||
|
||||
<p>A TrustKit pinning policy is a dictionary which contains some global, App-wide settings as well as domain-specific configuration keys. The following table shows the keys and their types, and uses indentation to indicate structure:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>| Key | Type |
|
||||
|----------------------------------------------|------------|
|
||||
| `TSKSwizzleNetworkDelegates` | Boolean |
|
||||
| `TSKIgnorePinningForUserDefinedTrustAnchors` | Boolean |
|
||||
| `TSKPinnedDomains` | Dictionary |
|
||||
| __ `<domain-name-to-pin-as-string>` | Dictionary |
|
||||
| ____ `TSKPublicKeyHashes` | Array |
|
||||
| ____ `TSKPublicKeyAlgorithms` | Array |
|
||||
| ____ `TSKIncludeSubdomains` | Boolean |
|
||||
| ____ `TSKEnforcePinning` | Boolean |
|
||||
| ____ `TSKReportUris` | Array |
|
||||
| ____ `kTSKDisableDefaultReportUri` | Boolean |
|
||||
</code></pre>
|
||||
|
||||
<p>When setting the pinning policy programmatically, it has to be supplied to the <code>initializeWithConfiguration:</code> method as a dictionary. For example:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> NSDictionary *trustKitConfig =
|
||||
@{
|
||||
kTSKSwizzleNetworkDelegates: @NO,
|
||||
kTSKPinnedDomains : @{
|
||||
@"www.datatheorem.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"HXXQgxueCIU5TTLHob/bPbwcKOKw6DkfsTWYHbxbqTY=",
|
||||
@"0SDf3cRToyZJaMsoS17oF72VMavLxj/N7WBNasNuiR8="
|
||||
],
|
||||
kTSKEnforcePinning : @NO,
|
||||
kTSKReportUris : @[@"http://report.datatheorem.com/log_report"],
|
||||
},
|
||||
@"yahoo.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa4096],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"TQEtdMbmwFgYUifM4LDF+xgEtd0z69mPGmkp014d6ZY=",
|
||||
@"rFjc3wG7lTZe43zeYTvPq8k4xdDEutCmIhI5dn4oCeE=",
|
||||
],
|
||||
kTSKIncludeSubdomains : @YES
|
||||
}
|
||||
}};
|
||||
|
||||
[TrustKit initializeWithConfiguration:trustKitConfig];
|
||||
</code></pre>
|
||||
|
||||
<p>Similarly, TrustKit can be initialized in Swift:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> let trustKitConfig = [
|
||||
kTSKSwizzleNetworkDelegates: false,
|
||||
kTSKPinnedDomains: [
|
||||
"yahoo.com": [
|
||||
kTSKPublicKeyAlgorithms: [kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes: [
|
||||
"JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg=",
|
||||
"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="
|
||||
],]]]
|
||||
|
||||
TrustKit.initializeWithConfiguration(config)
|
||||
</code></pre>
|
||||
|
||||
<p>The various configuration keys that can be specified in the policy are described in the <q>Constants</q> section of the documentation.</p>
|
||||
|
||||
<p>Lastly, once TrustKit has been initialized, <code><a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a></code> notifications will be posted every time TrustKit validates the certificate chain of a server; these notifications provide some information about the validation that was done and can be used for example for performance measurement.</p>
|
||||
|
||||
<a href="Classes/TrustKit.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TrustKit</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kt">TrustKit</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L315-L353">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TSKPinningValidator Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/objc/Class/TSKPinningValidator" class="dashAnchor"></a>
|
||||
<a title="TSKPinningValidator Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="../img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
TSKPinningValidator Class Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>TSKPinningValidator</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TSKPinningValidator</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>TSKPinningValidator</code> is a class for manually verifying a server’s identity against the global SSL pinning policy.</p>
|
||||
|
||||
<p>In specific scenarios, TrustKit cannot intercept outgoing SSL connections and automatically validate the server’s identity against the pinning policy:</p>
|
||||
|
||||
<ul>
|
||||
<li>All connections within an App that disables TrustKit’s network delegate swizzling by setting the <code><a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a></code> configuration key to <code>NO</code>.</li>
|
||||
<li>Connections that do not rely on the <code>NSURLConnection</code> or <code>NSURLSession</code> APIs:
|
||||
|
||||
<ul>
|
||||
<li><code>WKWebView</code> connections.</li>
|
||||
<li>Connections leveraging low-level network APIs (such as <code>NSStream</code>).</li>
|
||||
<li>Connections initiated using a third-party SSL library such as OpenSSL.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p>For these connections, pin validation must be manually triggered using one of the two available methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>evaluateTrust:forHostname:</code> which evaluates the server’s certificate chain against the global SSL pinning policy.</li>
|
||||
<li><code>handleChallenge:completionHandler:</code> a helper method to be used for implementing pinning validation in challenge handler methods within <code>NSURLSession</code> and <code>WKWebView</code> delegates.</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Manual%20SSL%20Pinning%20Validation"></a>
|
||||
<a name="//apple_ref/objc/Section/Manual SSL Pinning Validation" class="dashAnchor"></a>
|
||||
<a href="#/Manual%20SSL%20Pinning%20Validation">
|
||||
<h3 class="section-name">Manual SSL Pinning Validation</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TSKPinningValidator(cm)evaluateTrust:forHostname:"></a>
|
||||
<a name="//apple_ref/objc/Method/+evaluateTrust:forHostname:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TSKPinningValidator(cm)evaluateTrust:forHostname:">+evaluateTrust:forHostname:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Evaluate the supplied server trust against the global SSL pinning policy previously configured. If the validation fails, a pin failure report will be sent.</p>
|
||||
|
||||
<p>When using the <code>NSURLSession</code> or <code>WKWebView</code> network APIs, the <code>handleChallenge:completionHandler:</code> method should be called instead, as it is simpler to use.</p>
|
||||
|
||||
<p>When using low-level network APIs (such as <code>NSStream</code>), instructions on how to retrieve the connection’s <code>serverTrust</code> are available at <a href="https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html">https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html</a> .</p>
|
||||
|
||||
<div class="aside aside-warning">
|
||||
<p class="aside-title">Warning</p>
|
||||
<p>If no SSL pinning policy was configured for the supplied <em>serverHostname</em>, this method has no effect and will return <code>TSKTrustDecisionDomainNotPinned</code> without validating the supplied <em>serverTrust</em> at all. This means that the server’s <em>serverTrust</em> object <strong>must</strong> be verified against the device’s trust store using <code>SecTrustEvaluate()</code>. Failing to do so will <strong>disable SSL certificate validation</strong>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p>@exception NSException Thrown when TrustKit has not been initialized with a pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n"><a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a></span><span class="p">)</span><span class="nf">evaluateTrust</span><span class="p">:(</span><span class="n">SecTrustRef</span> <span class="n">_Nonnull</span><span class="p">)</span><span class="nv">serverTrust</span>
|
||||
<span class="nf">forHostname</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span><span class="p">)</span><span class="nv">serverHostname</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">evaluateTrust</span><span class="p">(</span><span class="n">_</span> <span class="nv">serverTrust</span><span class="p">:</span> <span class="kt">SecTrust</span><span class="p">,</span> <span class="n">forHostname</span> <span class="nv">serverHostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>serverTrust</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The trust object representing the server’s certificate chain. The trust’s evaluation policy is always overridden using <code>SecTrustSetPolicies()</code> to ensure all the proper SSL checks (expiration, hostname validation, etc.) are enabled.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>serverHostname</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The hostname of the server whose identity is being validated.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>A <code><a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a></code> which describes whether the SSL connection should be allowed or blocked, based on the global pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L83">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TSKPinningValidator(cm)handleChallenge:completionHandler:"></a>
|
||||
<a name="//apple_ref/objc/Method/+handleChallenge:completionHandler:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TSKPinningValidator(cm)handleChallenge:completionHandler:">+handleChallenge:completionHandler:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Helper method for handling authentication challenges received within a <code>NSURLSessionDelegate</code>, <code>NSURLSessionTaskDelegate</code> or <code>WKNavigationDelegate</code>.</p>
|
||||
|
||||
<p>This method will evaluate the server trust within the authentication challenge against the global SSL pinning policy previously configured, and then call the <code>completionHandler</code> with the corresponding <code>disposition</code> and <code>credential</code>. For example, this method can be leveraged in a <code>WKNavigationDelegate</code> challenge handler method:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>- (void)webView:(WKWebView *)webView
|
||||
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
|
||||
completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition,
|
||||
NSURLCredential *credential))completionHandler
|
||||
{
|
||||
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust])
|
||||
{
|
||||
[TSKPinningValidator handleChallenge:challenge completionHandler:completionHandler];
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>@exception NSException Thrown when TrustKit has not been initialized with a pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="nf">handleChallenge</span><span class="p">:(</span><span class="n">NSURLAuthenticationChallenge</span> <span class="o">*</span><span class="n">_Nonnull</span><span class="p">)</span><span class="nv">challenge</span>
|
||||
<span class="nf">completionHandler</span><span class="p">:</span>
|
||||
<span class="p">(</span><span class="kt">void</span> <span class="p">(</span><span class="o">^</span><span class="n">_Nonnull</span><span class="p">)(</span><span class="n">NSURLSessionAuthChallengeDisposition</span><span class="p">,</span>
|
||||
<span class="n">NSURLCredential</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">))</span><span class="n">completionHandler</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">handle</span><span class="p">(</span><span class="n">_</span> <span class="nv">challenge</span><span class="p">:</span> <span class="kt">URLAuthenticationChallenge</span><span class="p">,</span> <span class="nv">completionHandler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">URLSession</span><span class="o">.</span><span class="kt">AuthChallengeDisposition</span><span class="p">,</span> <span class="kt">URLCredential</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>challenge</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The authentication challenge, supplied by the URL loading system to the delegate’s challenge handler method.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completionHandler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>A block to invoke to respond to the challenge, supplied by the URL loading system to the delegate’s challenge handler method.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p><code>YES</code> if the challenge was handled and the <code>completionHandler</code> was successfuly invoked. <code>NO</code> if the challenge could not be handled because it was not for server certificate validation (ie. the challenge’s <code>authenticationMethod</code> was not <code>NSURLAuthenticationMethodServerTrust</code>).</p>
|
||||
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L110-L112">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+381
@@ -0,0 +1,381 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TrustKit Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/objc/Class/TrustKit" class="dashAnchor"></a>
|
||||
<a title="TrustKit Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="../img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
TrustKit Class Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>TrustKit</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="k">@interface</span> <span class="nc">TrustKit</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>TrustKit</code> is a class for programmatically configuring the global SSL pinning policy within an App.</p>
|
||||
|
||||
<p>The policy can be set either by adding it to the App’s <em>Info.plist</em> under the <code>TSKConfiguration</code> key, or by programmatically supplying it using the <code>TrustKit</code> class described here. Throughout the App’s lifecycle, TrustKit can only be initialized once so only one of the two techniques should be used.</p>
|
||||
|
||||
<p>A TrustKit pinning policy is a dictionary which contains some global, App-wide settings as well as domain-specific configuration keys. The following table shows the keys and their types, and uses indentation to indicate structure:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>| Key | Type |
|
||||
|----------------------------------------------|------------|
|
||||
| `TSKSwizzleNetworkDelegates` | Boolean |
|
||||
| `TSKIgnorePinningForUserDefinedTrustAnchors` | Boolean |
|
||||
| `TSKPinnedDomains` | Dictionary |
|
||||
| __ `<domain-name-to-pin-as-string>` | Dictionary |
|
||||
| ____ `TSKPublicKeyHashes` | Array |
|
||||
| ____ `TSKPublicKeyAlgorithms` | Array |
|
||||
| ____ `TSKIncludeSubdomains` | Boolean |
|
||||
| ____ `TSKEnforcePinning` | Boolean |
|
||||
| ____ `TSKReportUris` | Array |
|
||||
| ____ `kTSKDisableDefaultReportUri` | Boolean |
|
||||
</code></pre>
|
||||
|
||||
<p>When setting the pinning policy programmatically, it has to be supplied to the <code>initializeWithConfiguration:</code> method as a dictionary. For example:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> NSDictionary *trustKitConfig =
|
||||
@{
|
||||
kTSKSwizzleNetworkDelegates: @NO,
|
||||
kTSKPinnedDomains : @{
|
||||
@"www.datatheorem.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"HXXQgxueCIU5TTLHob/bPbwcKOKw6DkfsTWYHbxbqTY=",
|
||||
@"0SDf3cRToyZJaMsoS17oF72VMavLxj/N7WBNasNuiR8="
|
||||
],
|
||||
kTSKEnforcePinning : @NO,
|
||||
kTSKReportUris : @[@"http://report.datatheorem.com/log_report"],
|
||||
},
|
||||
@"yahoo.com" : @{
|
||||
kTSKPublicKeyAlgorithms : @[kTSKAlgorithmRsa4096],
|
||||
kTSKPublicKeyHashes : @[
|
||||
@"TQEtdMbmwFgYUifM4LDF+xgEtd0z69mPGmkp014d6ZY=",
|
||||
@"rFjc3wG7lTZe43zeYTvPq8k4xdDEutCmIhI5dn4oCeE=",
|
||||
],
|
||||
kTSKIncludeSubdomains : @YES
|
||||
}
|
||||
}};
|
||||
|
||||
[TrustKit initializeWithConfiguration:trustKitConfig];
|
||||
</code></pre>
|
||||
|
||||
<p>Similarly, TrustKit can be initialized in Swift:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code> let trustKitConfig = [
|
||||
kTSKSwizzleNetworkDelegates: false,
|
||||
kTSKPinnedDomains: [
|
||||
"yahoo.com": [
|
||||
kTSKPublicKeyAlgorithms: [kTSKAlgorithmRsa2048],
|
||||
kTSKPublicKeyHashes: [
|
||||
"JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg=",
|
||||
"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="
|
||||
],]]]
|
||||
|
||||
TrustKit.initializeWithConfiguration(config)
|
||||
</code></pre>
|
||||
|
||||
<p>The various configuration keys that can be specified in the policy are described in the <q>Constants</q> section of the documentation.</p>
|
||||
|
||||
<p>Lastly, once TrustKit has been initialized, <code><a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a></code> notifications will be posted every time TrustKit validates the certificate chain of a server; these notifications provide some information about the validation that was done and can be used for example for performance measurement.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Initialization"></a>
|
||||
<a name="//apple_ref/objc/Section/Initialization" class="dashAnchor"></a>
|
||||
<a href="#/Initialization">
|
||||
<h3 class="section-name">Initialization</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit(cm)initializeWithConfiguration:"></a>
|
||||
<a name="//apple_ref/objc/Method/+initializeWithConfiguration:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit(cm)initializeWithConfiguration:">+initializeWithConfiguration:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Initialize the global SSL pinning policy with the supplied configuration.</p>
|
||||
|
||||
<p>This method should be called as early as possible in the App’s lifecycle to ensure that the App’s very first SSL connections are validated by TrustKit. Once TrustKit has been initialized, notifications will be posted for any SSL pinning validation performed.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">initializeWithConfiguration</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSDictionary</span> <span class="o">*</span><span class="p">)</span><span class="nv">trustKitConfig</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">withConfiguration</span> <span class="nv">trustKitConfig</span><span class="p">:</span> <span class="p">[</span><span class="kt">AnyHashable</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">])</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>trustKitConfig</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>A dictionary containing various keys for configuring the global SSL pinning policy.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L330">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Current%20Configuration"></a>
|
||||
<a name="//apple_ref/objc/Section/Current Configuration" class="dashAnchor"></a>
|
||||
<a href="#/Current%20Configuration">
|
||||
<h3 class="section-name">Current Configuration</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit(cm)configuration"></a>
|
||||
<a name="//apple_ref/objc/Method/+configuration" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit(cm)configuration">+configuration</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Retrieve a copy of the global SSL pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">nullable</span> <span class="n">NSDictionary</span> <span class="o">*</span><span class="p">)</span><span class="n">configuration</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">configuration</span><span class="p">()</span> <span class="o">-></span> <span class="p">[</span><span class="kt">AnyHashable</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>A dictionary with a copy of the current TrustKit configuration, or <code>nil</code> if TrustKit has not been initialized.</p>
|
||||
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L342">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:objc(cs)TrustKit(cm)setLoggerBlock:"></a>
|
||||
<a name="//apple_ref/objc/Method/+setLoggerBlock:" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:objc(cs)TrustKit(cm)setLoggerBlock:">+setLoggerBlock:</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Set the global logger.</p>
|
||||
|
||||
<p>This method sets the global logger, used when TrustKit needs to display a message to the developer. </p>
|
||||
|
||||
<p>If a global logger is not set, the default logger will be used, which will print TrustKit log messages (using <code>NSLog()</code>) when the App is built in Debug mode. If the App was built for Release, the default logger will not print any messages at all.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">setLoggerBlock</span><span class="p">:(</span><span class="n">nonnull</span> <span class="kt">void</span> <span class="p">(</span><span class="o">^</span><span class="p">)(</span><span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span><span class="p">))</span><span class="nv">block</span><span class="p">;</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">setLoggerBlock</span><span class="p">(</span><span class="n">_</span> <span class="nv">block</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">String</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L351">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+997
@@ -0,0 +1,997 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Constants Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Constants Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Constants Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Constants</h1>
|
||||
<p>The following constants are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/TrustKit%20Version%20Number"></a>
|
||||
<a name="//apple_ref/objc/Section/TrustKit Version Number" class="dashAnchor"></a>
|
||||
<a href="#/TrustKit%20Version%20Number">
|
||||
<h3 class="section-name">TrustKit Version Number</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@TrustKitVersion"></a>
|
||||
<a name="//apple_ref/objc/Constant/TrustKitVersion" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The version of TrustKit, such as <q>1.4.0</q>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="n">NSString</span> <span class="o">*</span><span class="k">const</span> <span class="n">_Nonnull</span> <span class="n">TrustKitVersion</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">TrustKitVersion</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L23">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Global%20Configuration%20Keys%20-%20Required"></a>
|
||||
<a name="//apple_ref/objc/Section/Global Configuration Keys - Required" class="dashAnchor"></a>
|
||||
<a href="#/Global%20Configuration%20Keys%20-%20Required">
|
||||
<h3 class="section-name">Global Configuration Keys - Required</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKSwizzleNetworkDelegates"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKSwizzleNetworkDelegates" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, TrustKit will perform method swizzling on the App’s <code>NSURLConnection</code> and <code>NSURLSession</code> delegates in order to automatically add SSL pinning validation to the App’s connections.</p>
|
||||
|
||||
<p>Swizzling allows enabling pinning within an App without having to find and modify each and every instance of <code>NSURLConnection</code> or <code>NSURLSession</code> delegates.
|
||||
However, it should only be enabled for simple Apps, as it may not work properly in several scenarios including:</p>
|
||||
|
||||
<ul>
|
||||
<li>Apps with complex connection delegates, for example to handle client authentication via certificates or basic authentication.</li>
|
||||
<li>Apps where method swizzling of the connection delegates is already performed by another module or library (such as Analytics SDKs).</li>
|
||||
<li>Apps that do no use <code>NSURLSession</code> or <code>NSURLConnection</code> for their connections.</li>
|
||||
</ul>
|
||||
|
||||
<p>In such scenarios or if the developer wants a tigher control on the App’s networking behavior, <code>kTSKSwizzleNetworkDelegates</code> should be set to <code>NO</code>; the developer should then manually add pinning validation to the App’s authentication handlers.</p>
|
||||
|
||||
<p>See the <code><a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a></code> class for instructions on how to do so.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKSwizzleNetworkDelegates</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKSwizzleNetworkDelegates</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L58">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKPinnedDomains"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKPinnedDomains" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A dictionary with domains (such as <em><a href="http://www.domain.com">www.domain.com</a></em>) as keys and dictionaries as values.</p>
|
||||
|
||||
<p>Each entry should contain domain-specific settings for performing pinning validation when connecting to the domain, including for example the domain’s public key hashes. A list of all domain-specific keys is available in the <q>Domain-specific Keys</q> sections.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKPinnedDomains</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKPinnedDomains</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L66">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Global%20Configuration%20Keys%20-%20Optional"></a>
|
||||
<a name="//apple_ref/objc/Section/Global Configuration Keys - Optional" class="dashAnchor"></a>
|
||||
<a href="#/Global%20Configuration%20Keys%20-%20Optional">
|
||||
<h3 class="section-name">Global Configuration Keys - Optional</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKIgnorePinningForUserDefinedTrustAnchors"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKIgnorePinningForUserDefinedTrustAnchors" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, pinning validation will be skipped if the server’s certificate chain terminates at a user-defined trust anchor (such as a root CA that isn’t part of OS X’s default trust store) and no pin failure reports will be sent; default value is <code>YES</code>.</p>
|
||||
|
||||
<p>This is useful for allowing SSL connections through corporate proxies or firewalls. See <q>How does key pinning interact with local proxies and filters?</q> within the Chromium security FAQ at <a href="https://www.chromium.org/Home/chromium-security/security-faq">https://www.chromium.org/Home/chromium-security/security-faq</a> for more information.</p>
|
||||
|
||||
<p>Only available on macOS.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKIgnorePinningForUserDefinedTrustAnchors</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKIgnorePinningForUserDefinedTrustAnchors</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L80">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Domain-Specific%20Configuration%20Keys%20-%20Required"></a>
|
||||
<a name="//apple_ref/objc/Section/Domain-Specific Configuration Keys - Required" class="dashAnchor"></a>
|
||||
<a href="#/Domain-Specific%20Configuration%20Keys%20-%20Required">
|
||||
<h3 class="section-name">Domain-Specific Configuration Keys - Required</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKPublicKeyHashes"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKPublicKeyHashes" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>An array of SSL pins, where each pin is the base64-encoded SHA-256 hash of a certificate’s Subject Public Key Info.</p>
|
||||
|
||||
<p>TrustKit will verify that at least one of the specified pins is found in the server’s evaluated certificate chain.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKPublicKeyHashes</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKPublicKeyHashes</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L90">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKPublicKeyAlgorithms"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKPublicKeyAlgorithms" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>An array of <code><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></code> constants to specify the public key algorithms for the keys to be pinned.</p>
|
||||
|
||||
<p>TrustKit requires this information in order to compute SSL pins when validating a server’s certificate chain, because the <code>Security</code> framework does not provide APIs to extract the key’s algorithm from an SSL certificate. To minimize the performance impact of Trustkit, only one algorithm should be enabled.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKPublicKeyAlgorithms</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKPublicKeyAlgorithms</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L98">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Domain-Specific%20Configuration%20Keys%20-%20Optional"></a>
|
||||
<a name="//apple_ref/objc/Section/Domain-Specific Configuration Keys - Optional" class="dashAnchor"></a>
|
||||
<a href="#/Domain-Specific%20Configuration%20Keys%20-%20Optional">
|
||||
<h3 class="section-name">Domain-Specific Configuration Keys - Optional</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKEnforcePinning"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKEnforcePinning" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>NO</code>, TrustKit will not block SSL connections that caused a pin or certificate validation error; default value is <code>YES</code>.</p>
|
||||
|
||||
<p>When a pinning failure occurs, pin failure reports will always be sent to the configured report URIs regardless of the value of <code>kTSKEnforcePinning</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKEnforcePinning</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKEnforcePinning</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L108">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKIncludeSubdomains"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKIncludeSubdomains" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, also pin all the subdomains of the specified domain; default value is <code>NO</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKIncludeSubdomains</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKIncludeSubdomains</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L114">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKReportUris"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKReportUris" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>An array of URLs to which pin validation failures should be reported.</p>
|
||||
|
||||
<p>To minimize the performance impact of sending reports on each validation failure, the reports are uploaded using the background transfer service and are also rate-limited to one per day and per type of failure. For HTTPS report URLs, the HTTPS connections will ignore the SSL pinning policy and use the default certificate validation mechanisms, in order to maximize the chance of the reports reaching the server. The format of the reports is similar to the one described in RFC 7469 for the HPKP specification:</p>
|
||||
|
||||
<p>{
|
||||
<q>app-bundle-id</q>:<q>com.example.ABC</q>,
|
||||
<q>app-version</q>:<q>1.0</q>,
|
||||
<q>app-vendor-id</q>:<q>599F9C00-92DC-4B5C-9464-7971F01F8370</q>,
|
||||
<q>date-time</q>: <q>2015-07-10T20:03:14Z</q>,
|
||||
<q>hostname</q>: <q>mail.example.com</q>,
|
||||
<q>port</q>: 0,
|
||||
<q>include-subdomains</q>: true,
|
||||
<q>noted-hostname</q>: <q>example.com</q>,
|
||||
<q>validated-certificate-chain</q>: [
|
||||
pem1, … pemN
|
||||
],
|
||||
<q>known-pins</q>: [
|
||||
<q>pin-sha256=\</q>d6qzRu9zOECb90Uez27xWltNsj0e1Md7GkYYkVoZWmM=\<q>,
|
||||
“pin-sha256=“E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=\</q>
|
||||
],
|
||||
<q>validation-result</q>:1
|
||||
}</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKReportUris</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKReportUris</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L141">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKDisableDefaultReportUri"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKDisableDefaultReportUri" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A boolean. If set to <code>YES</code>, the default report URL for sending pin failure reports will be disabled; default value is <code>NO</code>.</p>
|
||||
|
||||
<p>By default, pin failure reports are sent to a report server hosted by Data Theorem, for detecting potential CA compromises and man-in-the-middle attacks, as well as providing a free dashboard for developers; email <a href="mailto:info@datatheorem.com">info@datatheorem.com</a> if you’d like a dashboard for your App. Only pin failure reports are sent, which contain the App’s bundle ID, the IDFV, and the server’s hostname and certificate chain that failed validation.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKDisableDefaultReportUri</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKDisableDefaultReportUri</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L149">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Supported%20Public%20Key%20Algorithm%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Supported Public Key Algorithm Keys" class="dashAnchor"></a>
|
||||
<a href="#/Supported%20Public%20Key%20Algorithm%20Keys">
|
||||
<h3 class="section-name">Supported Public Key Algorithm Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKAlgorithmRsa2048"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa2048" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>RSA 2048.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKAlgorithmRsa2048</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKAlgorithmRsa2048</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L170">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKAlgorithmRsa4096"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa4096" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>RSA 4096.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKAlgorithmRsa4096</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKAlgorithmRsa4096</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L176">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKAlgorithmEcDsaSecp256r1"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKAlgorithmEcDsaSecp256r1" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>ECDSA with secp256r1 curve.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKAlgorithmEcDsaSecp256r1</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKAlgorithmEcDsaSecp256r1</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L182">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20Name"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification Name" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20Name">
|
||||
<h3 class="section-name">Pinning Validation Notification Name</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationCompletedNotification"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationCompletedNotification" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The <code>name</code> of the notification to be posted for every request that is going through TrustKit’s pinning validation mechanism.</p>
|
||||
|
||||
<p>Once TrustKit has been initialized, notifications will be posted with this <code>name</code> every time TrustKit validates the certificate chain for a server configured in the SSL pinning policy; if the server’s hostname does not have an entry in the pinning policy, no notifications get posted as no pinning validation was performed.</p>
|
||||
|
||||
<p>These notifications can be used for performance measurement or to act upon any pinning validation performed by TrustKit (for example to customize the reporting mechanism). The notifications provide details about TrustKit’s inner-workings which most Apps should not need to process. Hence, these notifications can be ignored unless the App requires some advanced customization in regards to pinning validation.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">kTSKValidationCompletedNotification</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">static</span> <span class="k">let</span> <span class="nv">tskValidationCompleted</span><span class="p">:</span> <span class="kt">NSNotification</span><span class="o">.</span><span class="kt">Name</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L195">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20UserInfo%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification UserInfo Keys" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20UserInfo%20Keys">
|
||||
<h3 class="section-name">Pinning Validation Notification UserInfo Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationDurationNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationDurationNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The time in seconds it took for the SSL pinning validation to be performed.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationDurationNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationDurationNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L209">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationResultNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationResultNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The <code>TSKPinningValidationResult</code> returned when validating the server’s certificate chain, which represents the result of evaluating the certificate chain against the configured SSL pins for this server.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationResultNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationResultNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L215">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationDecisionNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationDecisionNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The <code><a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a></code> returned when validating the certificate’s chain, which describes whether the connection should be blocked or allowed, based on the <code>TSKPinningValidationResult</code> returned when evaluating the server’s certificate chain and the SSL pining policy configured for this server.</p>
|
||||
|
||||
<p>For example, the pinning validation could have failed (returning <code>TSKPinningValidationFailed</code>) but the policy might be set to ignore pinning validation failures for this server, thereby returning <code>TSKTrustDecisionShouldAllowConnection</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationDecisionNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationDecisionNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L222">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationCertificateChainNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationCertificateChainNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The certificate chain returned by the server as an array of PEM-formatted certificates.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationCertificateChainNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationCertificateChainNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L227">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationNotedHostnameNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationNotedHostnameNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The entry within the SSL pinning configuration that was used as the pinning policy for the server being validated. It will be the same as the <code><a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a></code> entry unless the server is a subdomain of a domain configured in the pinning policy with <code><a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a></code> enabled. The corresponding pinning configuration that was used for validation can be retrieved using:</p>
|
||||
|
||||
<pre class="highlight plaintext"><code>NSString *notedHostname = userInfo[kTSKValidationNotedHostnameNotificationKey];
|
||||
NSDictionary *hostnameConfiguration = [TrustKit configuration][kTSKPinnedDomains][notedHostname];
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationNotedHostnameNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationNotedHostnameNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L235">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@kTSKValidationServerHostnameNotificationKey"></a>
|
||||
<a name="//apple_ref/objc/Constant/kTSKValidationServerHostnameNotificationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The hostname of the server SSL pinning validation was performed against.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a></span> <span class="n">_Nonnull</span> <span class="n">kTSKValidationServerHostnameNotificationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">let</span> <span class="nv">kTSKValidationServerHostnameNotificationKey</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L240">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Enums Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Enums Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Enums Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Enums</h1>
|
||||
<p>The following enums are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision"></a>
|
||||
<a name="//apple_ref/objc/Enum/TSKTrustDecision" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision">TSKTrustDecision</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Possible return values when verifying a server’s identity against the global SSL pinning policy using <code><a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a></code>.</p>
|
||||
|
||||
<a href="Enums/TSKTrustDecision.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">enum</span> <span class="n">TSKTrustDecision</span> <span class="o">:</span> <span class="n">NSInteger</span> <span class="p">{}</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">enum</span> <span class="kt">TSKTrustDecision</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L20-L39">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+270
@@ -0,0 +1,270 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TSKTrustDecision Enum Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/objc/Enum/TSKTrustDecision" class="dashAnchor"></a>
|
||||
<a title="TSKTrustDecision Enum Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="../img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
TSKTrustDecision Enum Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="../Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>TSKTrustDecision</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="k">enum</span> <span class="n">TSKTrustDecision</span> <span class="o">:</span> <span class="n">NSInteger</span> <span class="p">{}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Possible return values when verifying a server’s identity against the global SSL pinning policy using <code><a href="../Classes/TSKPinningValidator.html">TSKPinningValidator</a></code>.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision@TSKTrustDecisionShouldAllowConnection"></a>
|
||||
<a name="//apple_ref/objc/Case/TSKTrustDecisionShouldAllowConnection" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision@TSKTrustDecisionShouldAllowConnection">TSKTrustDecisionShouldAllowConnection</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Based on the server’s certificate chain and the global pinning policy for this domain, the SSL connection should be allowed.
|
||||
This return value does not necessarily mean that the pinning validation succeded (for example if <code><a href="../Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a></code> was set to <code>NO</code> for this domain). If a pinning validation failure occured and if a report URI was configured, a pin failure report was sent.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="n">TSKTrustDecisionShouldAllowConnection</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">shouldAllowConnection</span> <span class="o">=</span> <span class="mi">0</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L26">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision@TSKTrustDecisionShouldBlockConnection"></a>
|
||||
<a name="//apple_ref/objc/Case/TSKTrustDecisionShouldBlockConnection" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision@TSKTrustDecisionShouldBlockConnection">TSKTrustDecisionShouldBlockConnection</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Based on the server’s certificate chain and the global pinning policy for this domain, the SSL connection should be blocked.
|
||||
A pinning validation failure occured and if a report URI was configured, a pin failure report was sent.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="n">TSKTrustDecisionShouldBlockConnection</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">shouldBlockConnection</span> <span class="o">=</span> <span class="mi">1</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L32">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@E@TSKTrustDecision@TSKTrustDecisionDomainNotPinned"></a>
|
||||
<a name="//apple_ref/objc/Case/TSKTrustDecisionDomainNotPinned" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@E@TSKTrustDecision@TSKTrustDecisionDomainNotPinned">TSKTrustDecisionDomainNotPinned</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>No pinning policy was configured for this domain and TrustKit did not validate the server’s identity.
|
||||
Because this will happen in an authentication handler, it means that the server’s <em>serverTrust</em> object <strong>needs</strong> to be verified against the device’s trust store using <code>SecTrustEvaluate()</code>. Failing to do so will <strong>disable SSL certificate validation</strong>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="n">TSKTrustDecisionDomainNotPinned</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">domainNotPinned</span> <span class="o">=</span> <span class="mi">2</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/Pinning/TSKPinningValidator.h#L38">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+330
@@ -0,0 +1,330 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Type Definitions Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Type Definitions Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Type Definitions Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Type Definitions</h1>
|
||||
<p>The following type definitions are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Configuration%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Configuration Keys" class="dashAnchor"></a>
|
||||
<a href="#/Configuration%20Keys">
|
||||
<h3 class="section-name">Configuration Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKGlobalConfigurationKey"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKGlobalConfigurationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A global, App-wide configuration key that can be set in the pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKGlobalConfigurationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKGlobalConfigurationKey</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L32">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKDomainConfigurationKey"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKDomainConfigurationKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A domain-specific configuration key (to defined for a domain under the <code><a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a></code> key) that can be set in the pinning policy.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKDomainConfigurationKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKDomainConfigurationKey</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L38">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Supported%20Public%20Key%20Algorithm%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Supported Public Key Algorithm Keys" class="dashAnchor"></a>
|
||||
<a href="#/Supported%20Public%20Key%20Algorithm%20Keys">
|
||||
<h3 class="section-name">Supported Public Key Algorithm Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKSupportedAlgorithm"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKSupportedAlgorithm" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A public key algorithm supported by TrustKit for computing SSL pins: </p>
|
||||
|
||||
<ul>
|
||||
<li><code><a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a></code></li>
|
||||
<li><code><a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a></code></li>
|
||||
<li><code><a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a></code></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKSupportedAlgorithm</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKSupportedAlgorithm</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L164">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Pinning%20Validation%20Notification%20UserInfo%20Keys"></a>
|
||||
<a name="//apple_ref/objc/Section/Pinning Validation Notification UserInfo Keys" class="dashAnchor"></a>
|
||||
<a href="#/Pinning%20Validation%20Notification%20UserInfo%20Keys">
|
||||
<h3 class="section-name">Pinning Validation Notification UserInfo Keys</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:TrustKit.h@T@TSKNotificationUserInfoKey"></a>
|
||||
<a name="//apple_ref/objc/Type/TSKNotificationUserInfoKey" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A key to be used to retrieve data about the pinning validation that occured, from the <code>userInfo</code> dictionary attached to a <code><a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a></code> notification.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Objective-C</p>
|
||||
<pre class="highlight"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKNotificationUserInfoKey</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">typealias</span> <span class="kt">TSKNotificationUserInfoKey</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/datatheorem/TrustKit/tree/1.4.0/TrustKit/TrustKit.h#L203">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+200
@@ -0,0 +1,200 @@
|
||||
/* Credit to https://gist.github.com/wataru420/2048287 */
|
||||
.highlight {
|
||||
/* Comment */
|
||||
/* Error */
|
||||
/* Keyword */
|
||||
/* Operator */
|
||||
/* Comment.Multiline */
|
||||
/* Comment.Preproc */
|
||||
/* Comment.Single */
|
||||
/* Comment.Special */
|
||||
/* Generic.Deleted */
|
||||
/* Generic.Deleted.Specific */
|
||||
/* Generic.Emph */
|
||||
/* Generic.Error */
|
||||
/* Generic.Heading */
|
||||
/* Generic.Inserted */
|
||||
/* Generic.Inserted.Specific */
|
||||
/* Generic.Output */
|
||||
/* Generic.Prompt */
|
||||
/* Generic.Strong */
|
||||
/* Generic.Subheading */
|
||||
/* Generic.Traceback */
|
||||
/* Keyword.Constant */
|
||||
/* Keyword.Declaration */
|
||||
/* Keyword.Pseudo */
|
||||
/* Keyword.Reserved */
|
||||
/* Keyword.Type */
|
||||
/* Literal.Number */
|
||||
/* Literal.String */
|
||||
/* Name.Attribute */
|
||||
/* Name.Builtin */
|
||||
/* Name.Class */
|
||||
/* Name.Constant */
|
||||
/* Name.Entity */
|
||||
/* Name.Exception */
|
||||
/* Name.Function */
|
||||
/* Name.Namespace */
|
||||
/* Name.Tag */
|
||||
/* Name.Variable */
|
||||
/* Operator.Word */
|
||||
/* Text.Whitespace */
|
||||
/* Literal.Number.Float */
|
||||
/* Literal.Number.Hex */
|
||||
/* Literal.Number.Integer */
|
||||
/* Literal.Number.Oct */
|
||||
/* Literal.String.Backtick */
|
||||
/* Literal.String.Char */
|
||||
/* Literal.String.Doc */
|
||||
/* Literal.String.Double */
|
||||
/* Literal.String.Escape */
|
||||
/* Literal.String.Heredoc */
|
||||
/* Literal.String.Interpol */
|
||||
/* Literal.String.Other */
|
||||
/* Literal.String.Regex */
|
||||
/* Literal.String.Single */
|
||||
/* Literal.String.Symbol */
|
||||
/* Name.Builtin.Pseudo */
|
||||
/* Name.Variable.Class */
|
||||
/* Name.Variable.Global */
|
||||
/* Name.Variable.Instance */
|
||||
/* Literal.Number.Integer.Long */ }
|
||||
.highlight .c {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2; }
|
||||
.highlight .k {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .o {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .cm {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cp {
|
||||
color: #999999;
|
||||
font-weight: bold; }
|
||||
.highlight .c1 {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cs {
|
||||
color: #999999;
|
||||
font-weight: bold;
|
||||
font-style: italic; }
|
||||
.highlight .gd {
|
||||
color: #000000;
|
||||
background-color: #ffdddd; }
|
||||
.highlight .gd .x {
|
||||
color: #000000;
|
||||
background-color: #ffaaaa; }
|
||||
.highlight .ge {
|
||||
color: #000000;
|
||||
font-style: italic; }
|
||||
.highlight .gr {
|
||||
color: #aa0000; }
|
||||
.highlight .gh {
|
||||
color: #999999; }
|
||||
.highlight .gi {
|
||||
color: #000000;
|
||||
background-color: #ddffdd; }
|
||||
.highlight .gi .x {
|
||||
color: #000000;
|
||||
background-color: #aaffaa; }
|
||||
.highlight .go {
|
||||
color: #888888; }
|
||||
.highlight .gp {
|
||||
color: #555555; }
|
||||
.highlight .gs {
|
||||
font-weight: bold; }
|
||||
.highlight .gu {
|
||||
color: #aaaaaa; }
|
||||
.highlight .gt {
|
||||
color: #aa0000; }
|
||||
.highlight .kc {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kd {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kp {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kr {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kt {
|
||||
color: #445588; }
|
||||
.highlight .m {
|
||||
color: #009999; }
|
||||
.highlight .s {
|
||||
color: #d14; }
|
||||
.highlight .na {
|
||||
color: #008080; }
|
||||
.highlight .nb {
|
||||
color: #0086B3; }
|
||||
.highlight .nc {
|
||||
color: #445588;
|
||||
font-weight: bold; }
|
||||
.highlight .no {
|
||||
color: #008080; }
|
||||
.highlight .ni {
|
||||
color: #800080; }
|
||||
.highlight .ne {
|
||||
color: #990000;
|
||||
font-weight: bold; }
|
||||
.highlight .nf {
|
||||
color: #990000; }
|
||||
.highlight .nn {
|
||||
color: #555555; }
|
||||
.highlight .nt {
|
||||
color: #000080; }
|
||||
.highlight .nv {
|
||||
color: #008080; }
|
||||
.highlight .ow {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .w {
|
||||
color: #bbbbbb; }
|
||||
.highlight .mf {
|
||||
color: #009999; }
|
||||
.highlight .mh {
|
||||
color: #009999; }
|
||||
.highlight .mi {
|
||||
color: #009999; }
|
||||
.highlight .mo {
|
||||
color: #009999; }
|
||||
.highlight .sb {
|
||||
color: #d14; }
|
||||
.highlight .sc {
|
||||
color: #d14; }
|
||||
.highlight .sd {
|
||||
color: #d14; }
|
||||
.highlight .s2 {
|
||||
color: #d14; }
|
||||
.highlight .se {
|
||||
color: #d14; }
|
||||
.highlight .sh {
|
||||
color: #d14; }
|
||||
.highlight .si {
|
||||
color: #d14; }
|
||||
.highlight .sx {
|
||||
color: #d14; }
|
||||
.highlight .sr {
|
||||
color: #009926; }
|
||||
.highlight .s1 {
|
||||
color: #d14; }
|
||||
.highlight .ss {
|
||||
color: #990073; }
|
||||
.highlight .bp {
|
||||
color: #999999; }
|
||||
.highlight .vc {
|
||||
color: #008080; }
|
||||
.highlight .vg {
|
||||
color: #008080; }
|
||||
.highlight .vi {
|
||||
color: #008080; }
|
||||
.highlight .il {
|
||||
color: #009999; }
|
||||
+332
@@ -0,0 +1,332 @@
|
||||
html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline; }
|
||||
|
||||
body {
|
||||
background-color: #f2f2f2;
|
||||
font-family: Helvetica, freesans, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
word-wrap: break-word; }
|
||||
|
||||
h1, h2, h3 {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.3em;
|
||||
font-weight: 100;
|
||||
color: black; }
|
||||
|
||||
h1 {
|
||||
font-size: 2.5em; }
|
||||
|
||||
h2 {
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid #e2e2e2; }
|
||||
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
margin-top: 21px; }
|
||||
|
||||
h5 {
|
||||
font-size: 1.1em; }
|
||||
|
||||
h6 {
|
||||
font-size: 1.1em;
|
||||
color: #777; }
|
||||
|
||||
.section-name {
|
||||
color: gray;
|
||||
display: block;
|
||||
font-family: Helvetica;
|
||||
font-size: 22px;
|
||||
font-weight: 100;
|
||||
margin-bottom: 15px; }
|
||||
|
||||
pre, code {
|
||||
font: 0.95em Menlo, monospace;
|
||||
color: #777;
|
||||
word-wrap: normal; }
|
||||
|
||||
p code, li code {
|
||||
background-color: #eee;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px; }
|
||||
|
||||
a {
|
||||
color: #0088cc;
|
||||
text-decoration: none; }
|
||||
|
||||
ul {
|
||||
padding-left: 15px; }
|
||||
|
||||
li {
|
||||
line-height: 1.8em; }
|
||||
|
||||
img {
|
||||
max-width: 100%; }
|
||||
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
padding: 0 10px;
|
||||
border-left: 4px solid #ccc; }
|
||||
|
||||
.content-wrapper {
|
||||
margin: 0 auto;
|
||||
width: 980px; }
|
||||
|
||||
header {
|
||||
font-size: 0.85em;
|
||||
line-height: 26px;
|
||||
background-color: #414141;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1; }
|
||||
header img {
|
||||
padding-right: 6px;
|
||||
vertical-align: -4px;
|
||||
height: 16px; }
|
||||
header a {
|
||||
color: #fff; }
|
||||
header p {
|
||||
float: left;
|
||||
color: #999; }
|
||||
header .header-right {
|
||||
float: right;
|
||||
margin-left: 16px; }
|
||||
|
||||
#breadcrumbs {
|
||||
background-color: #f2f2f2;
|
||||
height: 27px;
|
||||
padding-top: 17px;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
margin-top: 26px; }
|
||||
#breadcrumbs #carat {
|
||||
height: 10px;
|
||||
margin: 0 5px; }
|
||||
|
||||
.sidebar {
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #e2e2e2;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
bottom: 0;
|
||||
width: 230px;
|
||||
word-wrap: normal; }
|
||||
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
background: #fff;
|
||||
padding-left: 0; }
|
||||
|
||||
.nav-group-name {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
font-size: 1.1em;
|
||||
font-weight: 100;
|
||||
padding: 15px 0 15px 20px; }
|
||||
.nav-group-name > a {
|
||||
color: #333; }
|
||||
|
||||
.nav-group-tasks {
|
||||
margin-top: 5px; }
|
||||
|
||||
.nav-group-task {
|
||||
font-size: 0.9em;
|
||||
list-style-type: none;
|
||||
white-space: nowrap; }
|
||||
.nav-group-task a {
|
||||
color: #888; }
|
||||
|
||||
.main-content {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e2e2e2;
|
||||
margin-left: 246px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
padding-bottom: 60px;
|
||||
top: 70px;
|
||||
width: 734px; }
|
||||
.main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
|
||||
margin-bottom: 1em; }
|
||||
.main-content p {
|
||||
line-height: 1.8em; }
|
||||
.main-content section .section:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
.main-content section .task-group-section .task-group:first-of-type {
|
||||
padding-top: 10px; }
|
||||
.main-content section .task-group-section .task-group:first-of-type .section-name {
|
||||
padding-top: 15px; }
|
||||
|
||||
.section {
|
||||
padding: 0 25px; }
|
||||
|
||||
.highlight {
|
||||
background-color: #eee;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 4px;
|
||||
overflow-x: auto; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
padding: 0 40px 40px 0;
|
||||
margin-bottom: -25px;
|
||||
background-color: transparent;
|
||||
border: none; }
|
||||
|
||||
.section-name {
|
||||
margin: 0;
|
||||
margin-left: 18px; }
|
||||
|
||||
.task-group-section {
|
||||
padding-left: 6px;
|
||||
border-top: 1px solid #e2e2e2; }
|
||||
|
||||
.task-group {
|
||||
padding-top: 0px; }
|
||||
|
||||
.task-name-container a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
|
||||
.item {
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
list-style-type: none; }
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
.item code {
|
||||
background-color: transparent;
|
||||
padding: 0; }
|
||||
.item .token {
|
||||
padding-left: 3px;
|
||||
margin-left: 15px;
|
||||
font-size: 11.9px; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
color: gray;
|
||||
font-style: italic; }
|
||||
|
||||
.pointer-container {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -23px;
|
||||
padding-bottom: 13px;
|
||||
position: relative;
|
||||
width: 110%; }
|
||||
|
||||
.pointer {
|
||||
background: #f9f9f9;
|
||||
border-left: 1px solid #e2e2e2;
|
||||
border-top: 1px solid #e2e2e2;
|
||||
height: 12px;
|
||||
left: 21px;
|
||||
top: -7px;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
position: absolute;
|
||||
width: 12px; }
|
||||
|
||||
.height-container {
|
||||
display: none;
|
||||
left: -25px;
|
||||
padding: 0 25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden; }
|
||||
.height-container .section {
|
||||
background: #f9f9f9;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px; }
|
||||
|
||||
.aside, .language {
|
||||
padding: 6px 12px;
|
||||
margin: 12px 0;
|
||||
border-left: 5px solid #dddddd;
|
||||
overflow-y: hidden; }
|
||||
.aside .aside-title, .language .aside-title {
|
||||
font-size: 9px;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
padding-bottom: 0;
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
-webkit-user-select: none; }
|
||||
.aside p:last-child, .language p:last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.language {
|
||||
border-left: 5px solid #cde9f4; }
|
||||
.language .aside-title {
|
||||
color: #4b8afb; }
|
||||
|
||||
.aside-warning {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
border-collapse: collapse;
|
||||
width: 100%; }
|
||||
.graybox p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
min-width: 50px; }
|
||||
.graybox td {
|
||||
border: 1px solid #e2e2e2;
|
||||
padding: 5px 25px 5px 10px;
|
||||
vertical-align: middle; }
|
||||
.graybox tr td:first-of-type {
|
||||
text-align: right;
|
||||
padding: 7px;
|
||||
vertical-align: top;
|
||||
word-break: normal;
|
||||
width: 40px; }
|
||||
|
||||
.slightly-smaller {
|
||||
font-size: 0.9em; }
|
||||
|
||||
#footer {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
margin-left: 25px; }
|
||||
#footer p {
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
font-size: 0.8em; }
|
||||
|
||||
html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
|
||||
display: none; }
|
||||
html.dash .main-content {
|
||||
width: 980px;
|
||||
margin-left: 0;
|
||||
border: none;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
padding-bottom: 0; }
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
html.dash .item .token {
|
||||
margin-left: 0; }
|
||||
html.dash .content-wrapper {
|
||||
width: auto; }
|
||||
html.dash #footer {
|
||||
position: static; }
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 274 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,168 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TrustKit Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="TrustKit Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
TrustKit Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
|
||||
<a href='#trustkit-documentation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='trustkit-documentation'>TrustKit Documentation</h1>
|
||||
|
||||
<p>TrustKit is an open source framework that makes it easy to deploy SSL public key
|
||||
pinning in any iOS, macOS, tvOS or watchOS App.</p>
|
||||
|
||||
<p>This is the API documentation for TrustKit. For an overview of the framework and
|
||||
a more general guide to using it, see the project’s page at
|
||||
<a href="https://datatheorem.github.io/TrustKit">https://datatheorem.github.io/TrustKit</a> .</p>
|
||||
|
||||
<p>TrustKit requires iOS 7.0, macOS 10.9, tvOS 10.0 or watchOS 3.0 as the minimum
|
||||
deployment target.</p>
|
||||
|
||||
<p>Two classes are available enabling SSL pinning in an App:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>TrustKit</code>, for programmatically configuring the global SSL pinning policy within an
|
||||
App.</li>
|
||||
<li><code>TSKPinningValidator</code>, for manually validating a certificate chain against the App’s
|
||||
configured pinning policy.</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
window.jazzy = {'docset': false}
|
||||
if (typeof window.dash != 'undefined') {
|
||||
document.documentElement.className += ' dash'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
if (navigator.userAgent.match(/xcode/i)) {
|
||||
document.documentElement.className += ' xcode'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
// On doc load, toggle the URL hash discussion if present
|
||||
$(document).ready(function() {
|
||||
if (!window.jazzy.docset) {
|
||||
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
||||
linkToHash.trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
// On token click, toggle its discussion and animate token.marginLeft
|
||||
$(".token").click(function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var link = $(this);
|
||||
var animationDuration = 300;
|
||||
var tokenOffset = "15px";
|
||||
var original = link.css('marginLeft') == tokenOffset;
|
||||
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
|
||||
$content = link.parent().parent().next();
|
||||
$content.slideToggle(animationDuration);
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $(this).attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
location.hash = href;
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
Vendored
Executable
+4
File diff suppressed because one or more lines are too long
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"warnings": [
|
||||
|
||||
],
|
||||
"source_directory": "/Users/nabla/Documents/ios/TrustKit"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 274 B |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,168 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TrustKit Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="TrustKit Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">TrustKit Docs</a></p>
|
||||
<p class="header-right"><a href="https://github.com/datatheorem/TrustKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">TrustKit Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
TrustKit Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/TrustKit.html">TrustKit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Constants.html">Constants</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKReportUris">kTSKReportUris</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCertificateChainNotificationKey">kTSKValidationCertificateChainNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationCompletedNotification">kTSKValidationCompletedNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDecisionNotificationKey">kTSKValidationDecisionNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationDurationNotificationKey">kTSKValidationDurationNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationNotedHostnameNotificationKey">kTSKValidationNotedHostnameNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationResultNotificationKey">kTSKValidationResultNotificationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Constants.html#/c:@kTSKValidationServerHostnameNotificationKey">kTSKValidationServerHostnameNotificationKey</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a href="Type Definitions.html">Type Definitions</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKNotificationUserInfoKey">TSKNotificationUserInfoKey</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Type Definitions.html#/c:TrustKit.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
|
||||
<a href='#trustkit-documentation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='trustkit-documentation'>TrustKit Documentation</h1>
|
||||
|
||||
<p>TrustKit is an open source framework that makes it easy to deploy SSL public key
|
||||
pinning in any iOS, macOS, tvOS or watchOS App.</p>
|
||||
|
||||
<p>This is the API documentation for TrustKit. For an overview of the framework and
|
||||
a more general guide to using it, see the project’s page at
|
||||
<a href="https://datatheorem.github.io/TrustKit">https://datatheorem.github.io/TrustKit</a> .</p>
|
||||
|
||||
<p>TrustKit requires iOS 7.0, macOS 10.9, tvOS 10.0 or watchOS 3.0 as the minimum
|
||||
deployment target.</p>
|
||||
|
||||
<p>Two classes are available enabling SSL pinning in an App:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>TrustKit</code>, for programmatically configuring the global SSL pinning policy within an
|
||||
App.</li>
|
||||
<li><code>TSKPinningValidator</code>, for manually validating a certificate chain against the App’s
|
||||
configured pinning policy.</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2017 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2017-01-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
window.jazzy = {'docset': false}
|
||||
if (typeof window.dash != 'undefined') {
|
||||
document.documentElement.className += ' dash'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
if (navigator.userAgent.match(/xcode/i)) {
|
||||
document.documentElement.className += ' xcode'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
// On doc load, toggle the URL hash discussion if present
|
||||
$(document).ready(function() {
|
||||
if (!window.jazzy.docset) {
|
||||
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
||||
linkToHash.trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
// On token click, toggle its discussion and animate token.marginLeft
|
||||
$(".token").click(function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var link = $(this);
|
||||
var animationDuration = 300;
|
||||
var tokenOffset = "15px";
|
||||
var original = link.css('marginLeft') == tokenOffset;
|
||||
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
|
||||
$content = link.parent().parent().next();
|
||||
$content.slideToggle(animationDuration);
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $(this).attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
location.hash = href;
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
+4
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"warnings": [
|
||||
|
||||
],
|
||||
"source_directory": "/Users/nabla/Documents/ios/TrustKit"
|
||||
}
|
||||
Reference in New Issue
Block a user