Partially implement multikeys support (decryption)

This commit is contained in:
Mingshen Sun 2020-04-13 01:30:00 -07:00
parent 7f6e3f1909
commit b7ee00815c
7 changed files with 165 additions and 40 deletions

View file

@ -18,6 +18,13 @@ struct PGPKeyTestTriple {
let passphrase = "passforios"
}
struct MultiPGPKeyTestTriple {
let publicKey: String
let privateKey: String
let fingerprint: [String]
let passphrase: [String]
}
let RSA2048 = PGPKeyTestTriple(
publicKey: PGP_RSA2048_PUBLIC_KEY,
privateKey: PGP_RSA2048_PRIVATE_KEY,
@ -54,6 +61,13 @@ let ED25519_SUB = PGPKeyTestTriple(
fingerprint: "e9444483"
)
let RSA2048_RSA4096 = MultiPGPKeyTestTriple(
publicKey: PGP_RSA2048_PUBLIC_KEY + "\n" + PGP_RSA4096_PUBLIC_KEY,
privateKey: PGP_RSA2048_PRIVATE_KEY + "\n" + PGP_RSA4096_PRIVATE_KEY,
fingerprint: ["a1024dae", "d862027e"],
passphrase: ["passforios", "passforios"]
)
func requestPGPKeyPassphrase() -> String {
return "passforios"
}