SSLSettings

public struct SSLSettings: ExpressibleByBooleanLiteral

Settings for connecting to MongoDB via SSL.

  • Initializes SSLSettings using a boolean literal

    Declaration

    Swift

    public init(booleanLiteral value: Bool)
  • Enable SSL

    Declaration

    Swift

    public var enabled: Bool
  • Invalid host names should be allowed. Defaults to false. Take care before setting this to true, as it makes the application susceptible to man-in-the-middle attacks.

    Declaration

    Swift

    public var invalidHostNameAllowed: Bool
  • Invalis certificate should be allowed. Defaults to false. Take care before setting this to true, as it makes the application susceptible to man-in-the-middle attacks.

    Declaration

    Swift

    public var invalidCertificateAllowed: Bool
  • The path to the CA File that can be used to recognize the server

    Declaration

    Swift

    public var CAFilePath: String?
  • Creates an SSLSettings specification

    Declaration

    Swift

    public init(enabled: Bool, invalidHostNameAllowed: Bool = false, invalidCertificateAllowed: Bool = false, CAFilePath: String? = nil)