From: qianweili <qianweili@huawei.com> This series fixes several bugs in the UADK engine and provider, and adds non-block-aligned data handling and TLS 1.x GCM record offload to the provider AES-GCM path. Engine fixes: - Correct error log format and a misleading async macro name (01) - Balance the async recv loop count (02) - Fix wrong return values and missing NULL checks in error paths (03) - Securely release DH/ECDH/SM2 private keys and fix an SM2 order leak (04) - Fall back to software when digest/cipher session allocation fails (05) - Copy md_nid and md_update_status in SM2 ctx copy (06) Provider fixes: - Fix wrong parameter order in wd_xxx_init2_ calls (07) - Split session/key management into the init stage to avoid per-operation alloc/free overhead (08) - Handle non-block-aligned GCM data via an AES-CTR tail soft path (09) - Add TLS 1.x GCM record offload and an IV state machine (10) - Widen the IV buffer and fall back to software for non-default IV lengths (11) - Fix session allocation failure handling in multiple threads (12) - Fix a double-free in digest cleanup under multiple threads (13) Weili Qian (9): uadk_engine: fix error log format coding style and misleading async macro name uadk_engine: fix return value checks in error paths uadk_engine: securely release DH/ECDH/SM2 private key and fix SM2 order leak uadk_engine: copy md_nid and md_update_status in SM2 ctx copy uadk_provider: fix wrong parameter order in wd_xxx_init2_ call uadk_provider: split session/key management into init stage uadk_provider: handle non-block-aligned data via AES-CTR tail soft path uadk_provider: add TLS 1.x GCM record offload and IV state machine uadk_provider: widen IV buffer and fall back to software for non-default IV lengths Wenkai Lin (2): uadk_engine: fall back to software when digest/cipher session alloc fails uadk_provider: fix the double free problem in multiple threads Zhushuai Yin (1): uadk_provider: fix the error of allocating sessions in multiple threads lizhi (1): uadk_engine: adjust async recv loop count to balance async mode behavior src/uadk.h | 2 +- src/uadk_cipher.c | 3 +- src/uadk_dh.c | 8 +- src/uadk_digest.c | 40 +- src/uadk_ec.c | 52 +- src/uadk_ecx.c | 4 +- src/uadk_prov.h | 2 +- src/uadk_prov_aead.c | 1337 +++++++++++++++++++++++++------------ src/uadk_prov_cipher.c | 2 +- src/uadk_prov_dh.c | 6 +- src/uadk_prov_digest.c | 97 ++- src/uadk_prov_ecdh_exch.c | 23 +- src/uadk_prov_ecx.c | 10 +- src/uadk_prov_hmac.c | 4 +- src/uadk_prov_pkey.c | 8 +- src/uadk_prov_rsa_enc.c | 2 +- src/uadk_prov_sm2_enc.c | 2 +- src/uadk_prov_sm2_kmgmt.c | 11 +- src/uadk_prov_sm2_sign.c | 4 +- src/uadk_sm2.c | 18 +- 20 files changed, 1135 insertions(+), 500 deletions(-) -- 2.53.0.windows.2