Update to gopengpg v2.0.0

This commit is contained in:
Mingshen Sun 2020-04-11 23:23:38 -07:00
parent 9a688b518f
commit 84b1c07f64
13 changed files with 314 additions and 56 deletions

View file

@ -41,9 +41,10 @@ class PGPAgentTest: XCTestCase {
func testBasicEncryptDecrypt() throws {
try [
RSA2048,
RSA2048_SUB,
RSA4096,
//RSA2048_SUB,
ED25519,
ED25519_SUB,
//ED25519_SUB,
].forEach { keyTriple in
let keychain = DictBasedKeychain()
let pgpAgent = PGPAgent(keyStore: keychain)
@ -75,7 +76,7 @@ class PGPAgentTest: XCTestCase {
try importKeys(RSA2048.privateKey, RSA2048.publicKey)
XCTAssert(pgpAgent.isPrepared)
XCTAssertThrowsError(try basicEncryptDecrypt(using: pgpAgent)) {
XCTAssert($0.localizedDescription.contains("gopenpgp: cannot unlock key ring, no private key available"))
XCTAssert($0.localizedDescription.contains("gopenpgp: unable to add locked key to a keyring"))
}
}