Kitura / Swift-SMTP

Swift SMTP client
Apache License 2.0
260 stars 60 forks source link

SSLService.Configuration compile errors on macOS #94

Closed BraveMongoose closed 5 years ago

BraveMongoose commented 5 years ago

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.

ianpartridge commented 5 years ago

This should be fixed in version 1.0.41 of BlueSSLService - this commit: https://github.com/IBM-Swift/BlueSSLService/commit/499c8bfcefda58a1963927651619012e2311e90f

Please run swift package update and rebuild. Sorry!