forked from LoopKit/Loop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathISPPinnedNSURLSessionDelegate.h
More file actions
26 lines (20 loc) · 959 Bytes
/
Copy pathISPPinnedNSURLSessionDelegate.h
File metadata and controls
26 lines (20 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#if AMPLITUDE_SSL_PINNING
//
// ISPPinnedNSURLSessionDelegate.h
// SSLCertificatePinning
//
// Created by Alban Diquet on 1/14/14.
// Copyright (c) 2014 iSEC Partners. All rights reserved.
//
#import <Foundation/Foundation.h>
/** Convenience class to automatically perform certificate pinning for NSURLSession.
ISPPinnedNSURLSessionDelegate is designed to be subclassed in order to
implement an NSURLSession class. The
URLSession:didReceiveChallenge:completionHandler: method it implements
will automatically validate that at least one the certificates pinned to the domain the
connection is accessing is part of the server's certificate chain.
*/
@interface ISPPinnedNSURLSessionDelegate : NSObject
- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler;
@end
#endif