Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public enum SSLHandshakeError: Error, LocalizedError, Sendable {
case clientCertRequired(serverMessage: String)
case cipherMismatch(serverMessage: String)
case unknown(serverMessage: String)
case clientKeyPassphraseRequired(serverMessage: String)
case clientKeyPassphraseIncorrect(serverMessage: String)
case clientKeyInvalid(serverMessage: String)

public var serverMessage: String {
switch self {
Expand All @@ -16,6 +19,9 @@ public enum SSLHandshakeError: Error, LocalizedError, Sendable {
.untrustedCertificate(let msg),
.hostnameMismatch(let msg),
.clientCertRequired(let msg),
.clientKeyPassphraseRequired(let msg),
.clientKeyPassphraseIncorrect(let msg),
.clientKeyInvalid(let msg),
.cipherMismatch(let msg),
.unknown(let msg):
return msg
Expand All @@ -34,6 +40,12 @@ public enum SSLHandshakeError: Error, LocalizedError, Sendable {
return String(localized: "The server's TLS certificate does not match the hostname being connected to.")
case .clientCertRequired:
return String(localized: "The server requires a client certificate for TLS mutual authentication.")
case .clientKeyPassphraseRequired:
return String(localized: "The client private key is encrypted and needs a passphrase.")
case .clientKeyPassphraseIncorrect:
return String(localized: "The passphrase for the client private key is incorrect.")
case .clientKeyInvalid:
return String(localized: "The client private key could not be read. It may be malformed or in an unsupported format.")
case .cipherMismatch:
return String(localized: "The server and TablePro could not agree on a TLS cipher or protocol version.")
case .unknown:
Expand Down Expand Up @@ -86,6 +98,12 @@ public enum SSLHandshakeError: Error, LocalizedError, Sendable {
return String(localized: "Switch SSL Mode to Verify CA (validates the CA chain but skips hostname check), or update the host field to match the certificate.")
case .clientCertRequired:
return String(localized: "Provide the client certificate and key paths in the SSL tab.")
case .clientKeyPassphraseRequired:
return String(localized: "Open the connection editor, switch to the SSL tab, and enter the Key Passphrase.")
case .clientKeyPassphraseIncorrect:
return String(localized: "Open the connection editor, switch to the SSL tab, and correct the Key Passphrase.")
case .clientKeyInvalid:
return String(localized: "Check that the Client Key path points to a valid PEM private key.")
case .cipherMismatch:
return String(localized: "Update the server's TLS configuration or use a newer database server version that supports modern ciphers.")
case .unknown:
Expand Down
Loading