mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-08-31 01:20:57 +00:00
Remove 1024 bit rsa
This commit is contained in:
parent
ce52dd2b35
commit
7d6223a327
@ -58,7 +58,7 @@ public extension SecretStore {
|
|||||||
return .ecdsaSignatureMessageX962SHA256
|
return .ecdsaSignatureMessageX962SHA256
|
||||||
case (.ecdsa, 384):
|
case (.ecdsa, 384):
|
||||||
return .ecdsaSignatureMessageX962SHA384
|
return .ecdsaSignatureMessageX962SHA384
|
||||||
case (.rsa, 1024), (.rsa, 2048):
|
case (.rsa, 2048):
|
||||||
return .rsaSignatureMessagePKCS1v15SHA512
|
return .rsaSignatureMessagePKCS1v15SHA512
|
||||||
default:
|
default:
|
||||||
fatalError()
|
fatalError()
|
||||||
|
@ -115,7 +115,7 @@ extension OpenSSHKeyWriter {
|
|||||||
// [4 byte prefix][2 byte prefix][n][2 byte prefix][e]
|
// [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.
|
// 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
|
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 length = secret.keyType.size/8
|
||||||
let data = secret.publicKey
|
let data = secret.publicKey
|
||||||
let n = Data(data[8..<(9+length)])
|
let n = Data(data[8..<(9+length)])
|
||||||
|
Loading…
Reference in New Issue
Block a user