row editing

This commit is contained in:
Mark Gregory
2026-10-21 10:30:18 +01:00
parent 3f9f572434
commit 2aaeff3774
+8
View File
@@ -262,6 +262,7 @@ private final class MySQLSocketTransport {
}
func startTLS(host: String, verify: Bool) throws {
NSLog("DBSyn TLS: host=%@ verify=%@", host, verify ? "ON" : "OFF")
guard let context = SSLCreateContext(nil, .clientSide, .streamType) else {
throw MySQLWireError(message: "Unable to create MySQL TLS context")
}
@@ -407,6 +408,13 @@ final class MySQLWireConnection {
_ = try c.take(10)
let salt2 = try c.take(max(13, authLen - 8))
let salt = salt1 + salt2.prefix(max(0, authLen - 9))
// MySQL authentication uses the 20-byte server challenge.
guard salt.count == 20 else {
throw MySQLWireError(
message: "Invalid MySQL authentication challenge length: \(salt.count)"
)
}
let plugin = (try? c.nulString()) ?? "mysql_native_password"
if requireTLS {
let clientSSL = 0x00000800