Skip to content

Commit

Permalink
Merge pull request #1120 from ably/fix/1079
Browse files Browse the repository at this point in the history
Fix/1079
  • Loading branch information
lukasz-szyszkowski committed Jul 26, 2021
2 parents 91e3588 + d3cb627 commit 2556ab5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/ARTURLSessionServerTrust.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ @implementation ARTURLSessionServerTrust
- (instancetype)init:(dispatch_queue_t)queue {
if (self = [super init]) {
_queue = queue;
_session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] delegate:self delegateQueue:nil];
NSURLSessionConfiguration *config = [NSURLSessionConfiguration ephemeralSessionConfiguration];
if (@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)) {
config.TLSMinimumSupportedProtocolVersion = tls_protocol_version_TLSv12;
} else {
config.TLSMinimumSupportedProtocol = kTLSProtocol12;
}
_session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil];
}
return self;
}
Expand Down

0 comments on commit 2556ab5

Please sign in to comment.