Update sm9 functions

This commit is contained in:
Zhi Guan
2018-12-07 16:32:12 +08:00
parent 6f5b7a4c96
commit 1c00e47681
11 changed files with 5613 additions and 14 deletions

View File

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