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.
This commit is contained in:
Zhi Guan
2024-05-07 10:47:16 +08:00
parent 1301280b77
commit fad7830f1c

View File

@@ -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);