mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-22 21:47:16 +02:00
cryptutil: more explicit decryption error (#1607)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
7e19780d70
commit
f980517b7c
2 changed files with 12 additions and 12 deletions
|
@ -44,7 +44,7 @@ func Decrypt(a cipher.AEAD, data, ad []byte) ([]byte, error) {
|
|||
nonce := data[size:]
|
||||
plaintext, err := a.Open(nil, nonce, ciphertext, ad)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("cryptutil: decryption failed (mismatched keys?): %w", err)
|
||||
}
|
||||
return plaintext, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue