diff --git a/Sources/Packages/Sources/SecretKit/KeychainTypes.swift b/Sources/Packages/Sources/SecretKit/KeychainTypes.swift index c788573..75df0c3 100644 --- a/Sources/Packages/Sources/SecretKit/KeychainTypes.swift +++ b/Sources/Packages/Sources/SecretKit/KeychainTypes.swift @@ -58,7 +58,7 @@ public extension SecretStore { return .ecdsaSignatureMessageX962SHA256 case (.ecdsa, 384): return .ecdsaSignatureMessageX962SHA384 - case (.rsa, 1024), (.rsa, 2048): + case (.rsa, 2048): return .rsaSignatureMessagePKCS1v15SHA512 default: fatalError() diff --git a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift index 5313f65..f07b269 100644 --- a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift +++ b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift @@ -115,7 +115,7 @@ extension OpenSSHKeyWriter { // [4 byte prefix][2 byte prefix][n][2 byte prefix][e] // Rather than parse out the whole ASN.1 blob, we know how this should be formatted, so pull values directly. let keySize = secret.keyType.size - guard secret.keyType.algorithm == .rsa && (keySize == 1024 || keySize == 2048) else { fatalError() } + guard secret.keyType.algorithm == .rsa && keySize == 2048 else { fatalError() } let length = secret.keyType.size/8 let data = secret.publicKey let n = Data(data[8..<(9+length)])