summaryrefslogtreecommitdiffstats
path: root/crypto/sm2/sm2_crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/sm2/sm2_crypt.c')
-rw-r--r--crypto/sm2/sm2_crypt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/sm2/sm2_crypt.c b/crypto/sm2/sm2_crypt.c
index d6f9c81d8c..9e7887320c 100644
--- a/crypto/sm2/sm2_crypt.c
+++ b/crypto/sm2/sm2_crypt.c
@@ -48,7 +48,7 @@ static size_t ec_field_size(const EC_GROUP *group)
if (p == NULL || a == NULL || b == NULL)
goto done;
- if (!EC_GROUP_get_curve_GFp(group, p, a, b, NULL))
+ if (!EC_GROUP_get_curve(group, p, a, b, NULL))
goto done;
field_size = (BN_num_bits(p) + 7) / 8;
@@ -176,9 +176,9 @@ int sm2_encrypt(const EC_KEY *key,
}
if (!EC_POINT_mul(group, kG, k, NULL, NULL, ctx)
- || !EC_POINT_get_affine_coordinates_GFp(group, kG, x1, y1, ctx)
+ || !EC_POINT_get_affine_coordinates(group, kG, x1, y1, ctx)
|| !EC_POINT_mul(group, kP, NULL, P, k, ctx)
- || !EC_POINT_get_affine_coordinates_GFp(group, kP, x2, y2, ctx)) {
+ || !EC_POINT_get_affine_coordinates(group, kP, x2, y2, ctx)) {
SM2err(SM2_F_SM2_ENCRYPT, ERR_R_EC_LIB);
goto done;
}
@@ -326,11 +326,11 @@ int sm2_decrypt(const EC_KEY *key,
goto done;
}
- if (!EC_POINT_set_affine_coordinates_GFp(group, C1, sm2_ctext->C1x,
- sm2_ctext->C1y, ctx)
+ if (!EC_POINT_set_affine_coordinates(group, C1, sm2_ctext->C1x,
+ sm2_ctext->C1y, ctx)
|| !EC_POINT_mul(group, C1, NULL, C1, EC_KEY_get0_private_key(key),
ctx)
- || !EC_POINT_get_affine_coordinates_GFp(group, C1, x2, y2, ctx)) {
+ || !EC_POINT_get_affine_coordinates(group, C1, x2, y2, ctx)) {
SM2err(SM2_F_SM2_DECRYPT, ERR_R_EC_LIB);
goto done;
}