Update pre9
This commit is contained in:
@@ -111,11 +111,11 @@ static ECDSA_SIG *sm2_sig_gen(const EC_KEY *key, const BIGNUM *e)
|
||||
for (;;) {
|
||||
if (!BN_priv_rand_range(k, order)) {
|
||||
SM2err(SM2_F_SM2_SIG_GEN, ERR_R_INTERNAL_ERROR);
|
||||
goto done;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!EC_POINT_mul(group, kG, k, NULL, NULL, ctx)
|
||||
|| !EC_POINT_get_affine_coordinates_GFp(group, kG, x1, NULL,
|
||||
|| !EC_POINT_get_affine_coordinates(group, kG, x1, NULL,
|
||||
ctx)
|
||||
|| !BN_mod_add(r, e, x1, order, ctx)) {
|
||||
SM2err(SM2_F_SM2_SIG_GEN, ERR_R_INTERNAL_ERROR);
|
||||
@@ -224,7 +224,7 @@ static int sm2_sig_verify(const EC_KEY *key, const ECDSA_SIG *sig,
|
||||
}
|
||||
|
||||
if (!EC_POINT_mul(group, pt, s, EC_KEY_get0_public_key(key), t, ctx)
|
||||
|| !EC_POINT_get_affine_coordinates_GFp(group, pt, x1, NULL, ctx)) {
|
||||
|| !EC_POINT_get_affine_coordinates(group, pt, x1, NULL, ctx)) {
|
||||
SM2err(SM2_F_SM2_SIG_VERIFY, ERR_R_EC_LIB);
|
||||
goto done;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user