Improve error handling, fix linter (#92)

* Improve error handling, fix linter
This commit is contained in:
wussler 2020-10-29 12:42:32 +01:00 committed by GitHub
parent 6b2ac0b11c
commit 53a85837e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 194 additions and 186 deletions

View file

@ -18,7 +18,8 @@ func TestAESEncryption(t *testing.T) {
}
_, err = DecryptMessageWithPassword([]byte("Wrong passphrase"), ciphertext)
assert.EqualError(t, err, "gopenpgp: wrong password in symmetric decryption")
assert.EqualError(t, err, "gopenpgp: unable to decrypt message with password: "+
"gopenpgp: error in reading password protected message: gopenpgp: wrong password in symmetric decryption")
decrypted, err := DecryptMessageWithPassword(passphrase, ciphertext)
if err != nil {
@ -71,7 +72,7 @@ func TestArmoredTextMessageEncryptionVerification(t *testing.T) {
testMailboxPassword, // Password defined in base_test
armored,
)
assert.EqualError(t, err, "Signature Verification Error: No matching signature")
assert.EqualError(t, err, "gopenpgp: unable to decrypt message: Signature Verification Error: No matching signature")
decrypted, err := DecryptVerifyMessageArmored(
readTestFile("keyring_privateKey", false),