1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00

bsdkm driver: add missing CipherLifecycleInit call.

This commit is contained in:
jordan
2026-08-09 22:36:42 -05:00
parent 1e892cee21
commit ca292d8ac6

View File

@@ -763,6 +763,19 @@ static int wolfkdriv_cbc_work(device_t dev, wolfkdriv_session_t * session,
is_encrypt = 0;
memcpy(&aes, &session->aes_ctx.aes_decrypt, sizeof(aes));
}
#if defined(WOLFSSL_AESGCM_STREAM) && defined(WOLFSSL_SMALL_STACK) && \
!defined(WOLFSSL_AESNI)
aes.streamData = NULL;
#endif
#ifdef WC_DEBUG_CIPHER_LIFECYCLE
{
error = wc_debug_CipherLifecycleInit(&aes.CipherLifecycleTag, NULL);
if (error) {
error = EINVAL;
goto cbc_work_out;
}
}
#endif
/* must be multiple of block size */
if (data_len % WC_AES_BLOCK_SIZE) {
@@ -911,6 +924,15 @@ static int wolfkdriv_gcm_work(device_t dev, wolfkdriv_session_t * session,
!defined(WOLFSSL_AESNI)
aes.streamData = NULL;
#endif
#ifdef WC_DEBUG_CIPHER_LIFECYCLE
{
error = wc_debug_CipherLifecycleInit(&aes.CipherLifecycleTag, NULL);
if (error) {
error = EINVAL;
goto gcm_work_out;
}
}
#endif
data_len = crp->crp_payload_length;
if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) {