Improve error handling, fix linter (#92)
* Improve error handling, fix linter
This commit is contained in:
parent
6b2ac0b11c
commit
53a85837e0
23 changed files with 194 additions and 186 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue