TLSConfiguration
public struct TLSConfiguration
                Configuration for connecting with TLS. For more info, see https://github.com/Kitura/BlueSSLService.
- 
                  
                  
Initialize a configuration with no backing certificates.
Declaration
Swift
public init(withCipherSuite cipherSuite: String? = nil, clientAllowsSelfSignedCertificates: Bool = false)Parameters
cipherSuiteOptional String containing the cipher suite to use.
clientAllowsSelfSignedCertificatestrueto accept self-signed certificates from a server.falseotherwise. - 
                  
                  
Initialize a configuration using a
CA Certificatefile.Declaration
Swift
public init(withCACertificateFilePath caCertificateFilePath: String?, usingCertificateFile certificateFilePath: String?, withKeyFile keyFilePath: String? = nil, usingSelfSignedCerts selfSigned: Bool = true, cipherSuite: String? = nil)Parameters
caCertificateFilePathPath to the PEM formatted CA certificate file.
certificateFilePathPath to the PEM formatted certificate file.
keyFilePathPath to the PEM formatted key file. If nil,
certificateFilePathwill be used.selfSignedTrue if certs are
self-signed, false otherwise. Defaults to true.cipherSuiteOptional String containing the cipher suite to use.
 - 
                  
                  
Initialize a configuration using a
CA Certificatedirectory.Note:
caCertificateDirPath- All certificates in the specified directory must be hashed using theOpenSSL Certificate Tool.Declaration
Swift
public init(withCACertificateDirectory caCertificateDirPath: String?, usingCertificateFile certificateFilePath: String?, withKeyFile keyFilePath: String? = nil, usingSelfSignedCerts selfSigned: Bool = true, cipherSuite: String? = nil)Parameters
caCertificateDirPathPath to a directory containing CA certificates. (see note above)
certificateFilePathPath to the PEM formatted certificate file. If nil,
certificateFilePathwill be used.keyFilePathPath to the PEM formatted key file (optional). If nil,
certificateFilePathis used.selfSignedTrue if certs are
self-signed, false otherwise. Defaults to true.cipherSuiteOptional String containing the cipher suite to use.
 - 
                  
init(withChainFilePath:withPassword: usingSelfSignedCerts: clientAllowsSelfSignedCertificates: cipherSuite: ) Initialize a configuration using a
Certificate Chain File.Note: If using a certificate chain file, the certificates must be in PEM format and must be sorted starting with the subject’s certificate (actual client or server certificate), followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA.
Declaration
Swift
public init(withChainFilePath chainFilePath: String?, withPassword password: String? = nil, usingSelfSignedCerts selfSigned: Bool = true, clientAllowsSelfSignedCertificates: Bool = false, cipherSuite: String? = nil)Parameters
chainFilePathPath to the certificate chain file (optional). (see note above)
passwordPassword for the chain file (optional). If using self-signed certs, a password is required.
selfSignedTrue if certs are
self-signed, false otherwise. Defaults to true.clientAllowsSelfSignedCertificatesTrue if, as a client, connections to self-signed servers are allowed
cipherSuiteOptional String containing the cipher suite to use.
 - 
                  
                  
Initialize a configuration using a
PEM formatted certificate in String form. 
            View on GitHub
          
      TLSConfiguration Structure Reference