[前][次][番号順一覧][スレッド一覧]

ruby-changes:69397

From: Kazuki <ko1@a...>
Date: Mon, 25 Oct 2021 00:43:54 +0900 (JST)
Subject: [ruby-changes:69397] 555788b622 (master): [ruby/openssl] pkey/ec: deprecate PKey::EC::Point#make_affine! and make it a no-op

https://git.ruby-lang.org/ruby.git/commit/?id=555788b622

From 555788b62216996686387cdabd54f7fe10161d28 Mon Sep 17 00:00:00 2001
From: Kazuki Yamaguchi <k@r...>
Date: Tue, 30 Jun 2020 16:12:14 +0900
Subject: [ruby/openssl] 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.

https://github.com/ruby/openssl/commit/e2cc81fef7
---
 ext/openssl/ossl_pkey_ec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 47de7ccdbb..b317e45d6d 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -1252,6 +1252,8 @@ static VALUE ossl_ec_point_is_on_curve(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_pkey_ec.c#L1252
 /*
  * call-seq:
  *   point.make_affine! => self
+ *
+ * This method is deprecated and should not be used. This is a no-op.
  */
 static VALUE ossl_ec_point_make_affine(VALUE self)
 {
@@ -1261,8 +1263,11 @@ static VALUE ossl_ec_point_make_affine(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_pkey_ec.c#L1263
     GetECPoint(self, point);
     GetECPointGroup(self, group);
 
+    rb_warn("OpenSSL::PKey::EC::Point#make_affine! is deprecated");
+#if !OSSL_OPENSSL_PREREQ(3, 0, 0)
     if (EC_POINT_make_affine(group, point, ossl_bn_ctx) != 1)
         ossl_raise(cEC_POINT, "EC_POINT_make_affine");
+#endif
 
     return self;
 }
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]