Merge pull request #4146 from SparkiDev/pkcs11_dec_final

PKCS #11: Use C_Decrypt instead of C_DecryptUpdate
This commit is contained in:
David Garske 2021-06-21 15:28:45 -07:00 committed by GitHub
commit 52582ede28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3266,12 +3266,12 @@ static int Pkcs11AesCbcDecrypt(Pkcs11Session* session, wc_CryptoInfo* info)
}
if (ret == 0) {
outLen = info->cipher.aescbc.sz;
rv = session->func->C_DecryptUpdate(session->handle,
rv = session->func->C_Decrypt(session->handle,
(CK_BYTE_PTR)info->cipher.aescbc.in,
info->cipher.aescbc.sz,
info->cipher.aescbc.out,
&outLen);
PKCS11_RV("C_DecryptUpdate", rv);
PKCS11_RV("C_Decrypt", rv);
if (rv != CKR_OK) {
ret = WC_HW_E;
}