mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-08 23:13:38 +08:00
Update sm9 functions
This commit is contained in:
@@ -75,7 +75,7 @@ int SM2_ciphertext_size(const EC_KEY *ec_key, size_t inlen)
|
||||
int len = 0, i;
|
||||
|
||||
if (inlen > SM2_MAX_PLAINTEXT_LENGTH) {
|
||||
SM2err(SM2_F_SM2CIPHERTEXTVALUE_SIZE, SM2_R_PLAINTEXT_TOO_LONG);
|
||||
SM2err(SM2_F_SM2_CIPHERTEXT_SIZE, SM2_R_PLAINTEXT_TOO_LONG);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ int SM2_ciphertext_size(const EC_KEY *ec_key, size_t inlen)
|
||||
|
||||
/* ASN1_INTEGER xCoordinate, yCoordinate */
|
||||
if (!(i = EC_GROUP_order_bits(group))) {
|
||||
SM2err(SM2_F_SM2CIPHERTEXTVALUE_SIZE, ERR_R_EC_LIB);
|
||||
SM2err(SM2_F_SM2_CIPHERTEXT_SIZE, ERR_R_EC_LIB);
|
||||
return 0;
|
||||
}
|
||||
a.length = (i + 7)/8;
|
||||
|
||||
@@ -22,6 +22,7 @@ static ERR_STRING_DATA SM2_str_functs[] = {
|
||||
{ERR_FUNC(SM2_F_I2O_SM2CIPHERTEXTVALUE), "i2o_SM2CiphertextValue"},
|
||||
{ERR_FUNC(SM2_F_O2I_SM2CIPHERTEXTVALUE), "o2i_SM2CiphertextValue"},
|
||||
{ERR_FUNC(SM2_F_SM2CIPHERTEXTVALUE_SIZE), "SM2CiphertextValue_size"},
|
||||
{ERR_FUNC(SM2_F_SM2_CIPHERTEXT_SIZE), "SM2_ciphertext_size"},
|
||||
{ERR_FUNC(SM2_F_SM2_DECRYPT), "SM2_decrypt"},
|
||||
{ERR_FUNC(SM2_F_SM2_DO_DECRYPT), "SM2_do_decrypt"},
|
||||
{ERR_FUNC(SM2_F_SM2_DO_ENCRYPT), "SM2_do_encrypt"},
|
||||
|
||||
Reference in New Issue
Block a user