From 9117b0bd6fff5b3eff91caa9185e81754a10e3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Qu=E1=BB=91c=20=C4=90=E1=BA=A1t?= Date: Mon, 1 Jun 2026 12:59:23 +0700 Subject: [PATCH] fix(plugins): sync TableProCore PluginKit SSLHandshakeError with the framework --- .../TableProPluginKit/SSLHandshakeError.swift | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Packages/TableProCore/Sources/TableProPluginKit/SSLHandshakeError.swift b/Packages/TableProCore/Sources/TableProPluginKit/SSLHandshakeError.swift index 5c0124e77..bdc7fed27 100644 --- a/Packages/TableProCore/Sources/TableProPluginKit/SSLHandshakeError.swift +++ b/Packages/TableProCore/Sources/TableProPluginKit/SSLHandshakeError.swift @@ -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 { @@ -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 @@ -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: @@ -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: