Skip to content

Commit f0c4daf

Browse files
authored
pkcs5: fixup cbc_decrypt error (#1678)
Fixes #1634
1 parent ebf3961 commit f0c4daf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkcs5/src/pbes2/encryption.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn cbc_decrypt<'a, C: BlockCipherDecrypt + KeyInit>(
4646
cbc::Decryptor::<C>::new_from_slices(key.as_slice(), iv)
4747
.map_err(|_| es.to_alg_params_invalid())?
4848
.decrypt_padded::<Pkcs7>(buffer)
49-
.map_err(|_| Error::EncryptFailed)
49+
.map_err(|_| Error::DecryptFailed)
5050
}
5151

5252
fn gcm_encrypt<C, NonceSize, TagSize>(

0 commit comments

Comments
 (0)