From fad7830f1c1d12f28b48a2236298108b4012cc0b Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Tue, 7 May 2024 10:47:16 +0800 Subject: [PATCH] Update sdf_lib.c The `ECCCipher` in GmSSL has enough ciphertext buffer, so length checking is not required. And without setting ECCCipher.L makes the API easier to use. --- src/sdf/sdf_lib.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/sdf/sdf_lib.c b/src/sdf/sdf_lib.c index 46c5fb02..e542fce2 100755 --- a/src/sdf/sdf_lib.c +++ b/src/sdf/sdf_lib.c @@ -1048,11 +1048,6 @@ int SDF_InternalEncrypt_ECC( return SDR_NOTSUPPORT; } - if (pucEncData->L < uiDataLength) { - SDFerr(SDF_R_BUFFER_TOO_SMALL); - return SDR_NOBUFFER; - } - if (sdf_vendor && sdf_vendor->decode_ecccipher) { if (SDF_NewECCCipher(&buf, uiDataLength) != SDR_OK) { SDFerr(ERR_R_SDF_LIB);