-
Notifications
You must be signed in to change notification settings - Fork 125
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 3 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 { | ||
#if !targetEnvironment(macCatalyst) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pokryfka you'll need to do
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. friendly ping @pokryfka There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thank you for the reminder and previous comment my (personal) project using Catalyst and AHC, and in fact swift-server in general, is waiting for my professional contract to finish, which is in a few weeks 🎉 anyway, its a small change, and would be great to be able to use official AHC in my project will test it and update the PR tomorrow |
||
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 { | ||
#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.