Skip to content

Commit 43ed58d

Browse files
committed
pkey/ec: deprecate PKey::EC::Point#make_affine! and make it a no-op
It converts the internal representation of the point object to the affine coordinate system. However, it had no real use case because the difference in the internal representation has not been visible from Ruby/OpenSSL at all. EC_POINT_make_affine() is marked as deprecated in OpenSSL 3.0.
1 parent 0c33595 commit 43ed58d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/openssl/ossl_pkey_ec.c

+5
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,8 @@ static VALUE ossl_ec_point_is_on_curve(VALUE self)
12521252
/*
12531253
* call-seq:
12541254
* point.make_affine! => self
1255+
*
1256+
* This method is deprecated and should not be used. This is a no-op.
12551257
*/
12561258
static VALUE ossl_ec_point_make_affine(VALUE self)
12571259
{
@@ -1261,8 +1263,11 @@ static VALUE ossl_ec_point_make_affine(VALUE self)
12611263
GetECPoint(self, point);
12621264
GetECPointGroup(self, group);
12631265

1266+
rb_warn("OpenSSL::PKey::EC::Point#make_affine! is deprecated");
1267+
#if !OSSL_OPENSSL_PREREQ(3, 0, 0)
12641268
if (EC_POINT_make_affine(group, point, ossl_bn_ctx) != 1)
12651269
ossl_raise(cEC_POINT, "EC_POINT_make_affine");
1270+
#endif
12661271

12671272
return self;
12681273
}

0 commit comments

Comments
 (0)