Skip to content

Commit 052342c

Browse files
address comments
1 parent 9a94385 commit 052342c

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

WebDriverAgentLib/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7367,21 +7367,12 @@ - (void)ssl_startTLS
73677367
value = [tlsSettings objectForKey:GCDAsyncSocketSSLALPN];
73687368
if ([value isKindOfClass:[NSArray class]])
73697369
{
7370-
if (@available(iOS 11.0, macOS 10.13, tvOS 11.0, *))
7371-
{
7372-
CFArrayRef protocols = (__bridge CFArrayRef)((NSArray *) value);
7373-
status = SSLSetALPNProtocols(sslContext, protocols);
7374-
if (status != noErr)
7375-
{
7376-
[self closeWithError:[self otherError:@"Error in SSLSetALPNProtocols"]];
7377-
return;
7378-
}
7379-
}
7380-
else
7370+
CFArrayRef protocols = (__bridge CFArrayRef)((NSArray *) value);
7371+
status = SSLSetALPNProtocols(sslContext, protocols);
7372+
if (status != noErr)
73817373
{
7382-
NSAssert(NO, @"Security option unavailable - GCDAsyncSocketSSLALPN"
7383-
@" - iOS 11.0, macOS 10.13 required");
7384-
[self closeWithError:[self otherError:@"Security option unavailable - GCDAsyncSocketSSLALPN"]];
7374+
[self closeWithError:[self otherError:@"Error in SSLSetALPNProtocols"]];
7375+
return;
73857376
}
73867377
}
73877378
else if (value)

0 commit comments

Comments
 (0)