mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-08 23:13:38 +08:00
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:
@@ -1048,11 +1048,6 @@ int SDF_InternalEncrypt_ECC(
|
|||||||
return SDR_NOTSUPPORT;
|
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_vendor && sdf_vendor->decode_ecccipher) {
|
||||||
if (SDF_NewECCCipher(&buf, uiDataLength) != SDR_OK) {
|
if (SDF_NewECCCipher(&buf, uiDataLength) != SDR_OK) {
|
||||||
SDFerr(ERR_R_SDF_LIB);
|
SDFerr(ERR_R_SDF_LIB);
|
||||||
|
|||||||
Reference in New Issue
Block a user