File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Sources/AsyncHTTPClient/NIOTransportServices Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 60
60
///
61
61
/// - Parameter queue: Dispatch queue to run `sec_protocol_options_set_verify_block` on.
62
62
/// - Returns: Equivalent NWProtocolTLS Options
63
- func getNWProtocolTLSOptions( ) -> NWProtocolTLS . Options {
63
+ func getNWProtocolTLSOptions( ) throws -> NWProtocolTLS . Options {
64
64
let options = NWProtocolTLS . Options ( )
65
65
66
66
let useMTELGExplainer = """
125
125
var secTrustRoots : [ SecCertificate ] ?
126
126
switch trustRoots {
127
127
case . some( . certificates( let certificates) ) :
128
- do {
129
- secTrustRoots = try certificates. compactMap { certificate in
130
- try SecCertificateCreateWithData ( nil , Data ( certificate. toDERBytes ( ) ) as CFData )
131
- }
132
- } catch {
133
- // failed to load
128
+ secTrustRoots = try certificates. compactMap { certificate in
129
+ try SecCertificateCreateWithData ( nil , Data ( certificate. toDERBytes ( ) ) as CFData )
134
130
}
135
131
case . some( . file) :
136
132
preconditionFailure ( " TLSConfiguration.trustRoots.file is not supported " )
You can’t perform that action at this time.
0 commit comments