Skip to content

Commit

Permalink
To avoid confusion regarding the availability of SSLService.Configura…
Browse files Browse the repository at this point in the history
…tion APIs on supported platforms, added @available attributes to all the APIs that only supported on the Linux platform.
  • Loading branch information
billabt committed Dec 12, 2018
1 parent 2b58638 commit 468d581
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/SSLService/SSLService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ public class SSLService: SSLServiceDelegate {
///
/// - Returns: New Configuration instance.
///
@available(macOS, unavailable, message: "This API not supported on Apple platforms.")
@available(iOS, unavailable, message: "This API not supported on Apple platforms.")
@available(tvOS, unavailable, message: "This API not supported on Apple platforms.")
public init(withCipherSuite cipherSuite: String? = nil, clientAllowsSelfSignedCertificates: Bool = true) {

self.noBackingCertificates = true
Expand All @@ -206,6 +209,9 @@ public class SSLService: SSLServiceDelegate {
///
/// - Returns: New Configuration instance.
///
@available(macOS, unavailable, message: "This API not supported on Apple platforms.")
@available(iOS, unavailable, message: "This API not supported on Apple platforms.")
@available(tvOS, unavailable, message: "This API not supported on Apple platforms.")
public init(withCACertificateFilePath caCertificateFilePath: String?, usingCertificateFile certificateFilePath: String?, withKeyFile keyFilePath: String? = nil, usingSelfSignedCerts selfSigned: Bool = true, cipherSuite: String? = nil) {

self.certificateFilePath = certificateFilePath
Expand All @@ -231,6 +237,9 @@ public class SSLService: SSLServiceDelegate {
///
/// - Returns: New Configuration instance.
///
@available(macOS, unavailable, message: "This API not supported on Apple platforms.")
@available(iOS, unavailable, message: "This API not supported on Apple platforms.")
@available(tvOS, unavailable, message: "This API not supported on Apple platforms.")
public init(withCACertificateDirectory caCertificateDirPath: String?, usingCertificateFile certificateFilePath: String?, withKeyFile keyFilePath: String? = nil, usingSelfSignedCerts selfSigned: Bool = true, cipherSuite: String? = nil) {

self.certificateFilePath = certificateFilePath
Expand Down

0 comments on commit 468d581

Please sign in to comment.