-
Notifications
You must be signed in to change notification settings - Fork 133
Fixed compilation on Mac Catalyst #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
a230b4a
cd3396a
c01e323
f04d4bf
05c69fb
0106719
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ | |
} | ||
} | ||
|
||
@available(iOS, introduced: 5.0, deprecated: 13.0) | ||
extension TLSVersion { | ||
/// return as SSL protocol | ||
var sslProtocol: SSLProtocol { | ||
|
@@ -67,15 +68,23 @@ | |
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) { | ||
sec_protocol_options_set_min_tls_protocol_version(options.securityProtocolOptions, self.minimumTLSVersion.nwTLSProtocolVersion) | ||
} else { | ||
sec_protocol_options_set_tls_min_version(options.securityProtocolOptions, self.minimumTLSVersion.sslProtocol) | ||
#if !targetEnvironment(macCatalyst) | ||
|
||
sec_protocol_options_set_tls_min_version(options.securityProtocolOptions, self.minimumTLSVersion.sslProtocol) | ||
#else | ||
preconditionFailure("macCatalyst 13 is the first version of macCatalyst") | ||
#endif | ||
} | ||
|
||
// maximum TLS protocol | ||
if let maximumTLSVersion = self.maximumTLSVersion { | ||
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) { | ||
sec_protocol_options_set_max_tls_protocol_version(options.securityProtocolOptions, maximumTLSVersion.nwTLSProtocolVersion) | ||
} else { | ||
sec_protocol_options_set_tls_max_version(options.securityProtocolOptions, maximumTLSVersion.sslProtocol) | ||
#if !targetEnvironment(macCatalyst) | ||
sec_protocol_options_set_tls_max_version(options.securityProtocolOptions, maximumTLSVersion.sslProtocol) | ||
#else | ||
preconditionFailure("macCatalyst 13 is the first version of macCatalyst") | ||
#endif | ||
} | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.