mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-08 17:50:50 +02:00
Add test case for free ecc/dilithum callback for expected behavior to match existing free callback code paths
This commit is contained in:
@@ -76,6 +76,7 @@ jobs:
|
||||
'--enable-sessionexport',
|
||||
'--enable-cryptocb --enable-aesgcm CPPFLAGS="-DWOLF_CRYPTO_CB_AES_SETKEY -DWOLF_CRYPTO_CB_FREE"',
|
||||
'--disable-tls --enable-cryptocb --enable-aesgcm CPPFLAGS="-DWOLF_CRYPTO_CB_AES_SETKEY -DWOLF_CRYPTO_CB_FREE"',
|
||||
'--enable-all --enable-dilithium --enable-cryptocb --enable-cryptocbutils --enable-pkcallbacks',
|
||||
'--enable-cryptocb --enable-aesgcm CPPFLAGS="-DWOLF_CRYPTO_CB_AES_SETKEY"',
|
||||
'--disable-examples CPPFLAGS=-DWOLFSSL_NO_MALLOC',
|
||||
'CPPFLAGS=-DNO_WOLFSSL_CLIENT',
|
||||
|
||||
@@ -65407,6 +65407,37 @@ static int myCryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
ret = WC_NO_ERR_TRACE(NOT_COMPILED_IN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (info->free.algo == WC_ALGO_TYPE_PK) {
|
||||
switch (info->free.type) {
|
||||
#ifdef HAVE_ECC
|
||||
case WC_PK_TYPE_EC_KEYGEN:
|
||||
{
|
||||
ecc_key* ecc = (ecc_key*)info->free.obj;
|
||||
ecc->devId = INVALID_DEVID;
|
||||
wc_ecc_free(ecc);
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_DILITHIUM
|
||||
case WC_PK_TYPE_PQC_SIG_KEYGEN:
|
||||
{
|
||||
if (info->free.subType ==
|
||||
WC_PQC_SIG_TYPE_DILITHIUM) {
|
||||
dilithium_key* dil =
|
||||
(dilithium_key*)info->free.obj;
|
||||
dil->devId = INVALID_DEVID;
|
||||
wc_dilithium_free(dil);
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
ret = WC_NO_ERR_TRACE(NOT_COMPILED_IN);
|
||||
|
||||
Reference in New Issue
Block a user