Skip to content

Commit

Permalink
pkcs5: fixup cbc_decrypt error (#1678)
Browse files Browse the repository at this point in the history
Fixes #1634
  • Loading branch information
baloo authored Feb 25, 2025
1 parent ebf3961 commit f0c4daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkcs5/src/pbes2/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn cbc_decrypt<'a, C: BlockCipherDecrypt + KeyInit>(
cbc::Decryptor::<C>::new_from_slices(key.as_slice(), iv)
.map_err(|_| es.to_alg_params_invalid())?
.decrypt_padded::<Pkcs7>(buffer)
.map_err(|_| Error::EncryptFailed)
.map_err(|_| Error::DecryptFailed)
}

fn gcm_encrypt<C, NonceSize, TagSize>(
Expand Down

0 comments on commit f0c4daf

Please sign in to comment.