NIOSSLExtraError

public struct NIOSSLExtraError : Error
extension NIOSSLExtraError: CustomStringConvertible
extension NIOSSLExtraError: Equatable

This structure contains errors added to NIOSSL after the original NIOSSLError enum was shipped. This is an extensible error object that allows us to evolve it going forward.

  • NIOSSL was unable to validate the hostname presented by the remote peer.

    Declaration

    Swift

    public static let failedToValidateHostname: NIOSSLExtraError
  • The server hostname provided by the user cannot match any names in the certificate due to containing invalid characters.

    Declaration

    Swift

    public static let serverHostnameImpossibleToMatch: NIOSSLExtraError
  • IP addresses may not be used in SNI.

    Declaration

    Swift

    public static let cannotUseIPAddressInSNI: NIOSSLExtraError
  • The SNI hostname requirements have not been met.

    Note

    Should the provided SNI hostname be an IP address instead, .cannotUseIPAddressInSNI is thrown instead of this error.

    Reasons a hostname might not meet the requirements:

    • hostname in UTF8 is more than 255 bytes
    • hostname is the empty string
    • hostname contains the 0 unicode scalar (which would be encoded as the 0 byte which is unsupported).

    Declaration

    Swift

    public static let invalidSNIHostname: NIOSSLExtraError
  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public static func == (lhs: NIOSSLExtraError, rhs: NIOSSLExtraError) -> Bool