Kitura/Swift-SMTP

SSLService.Configuration compile errors on macOS

BraveMongoose opened this issue · 1 comments

Seeing these compile errors for the SwiftSMTP module since updating my project dependencies:

.../Sources/SwiftSMTP/TLSConfiguration.swift:33:36: 'init(withCipherSuite:clientAllowsSelfSignedCertificates:)' is unavailable: This API not supported on Apple platforms.

.../Sources/SwiftSMTP/TLSConfiguration.swift:53:36: 'init(withCACertificateFilePath:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)' is unavailable: This API not supported on Apple platforms.

.../Sources/SwiftSMTP/TLSConfiguration.swift:78:36: 'init(withCACertificateDirectory:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)' is unavailable: This API not supported on Apple platforms.

Believe this may be related to a recent change in BlueSSLService 1.0.40. (The previous working version in Package.resolved was BlueSSLService 1.0.25).

To avoid confusion regarding the availability of SSLService.Configuration APIs on supported platforms, added @available attributes to all the APIs that are only supported on the Linux platform. This will cause compile time errors if the wrong API is used on Apple platforms.

This should be fixed in version 1.0.41 of BlueSSLService - this commit: Kitura/BlueSSLService@499c8bf

Please run swift package update and rebuild. Sorry!