зеркало из https://github.com/github/ruby.git
[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
This commit is contained in:
Родитель
16272d9ae9
Коммит
555788b622
|
@ -1252,6 +1252,8 @@ static VALUE ossl_ec_point_is_on_curve(VALUE self)
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* point.make_affine! => self
|
* 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)
|
static VALUE ossl_ec_point_make_affine(VALUE self)
|
||||||
{
|
{
|
||||||
|
@ -1261,8 +1263,11 @@ static VALUE ossl_ec_point_make_affine(VALUE self)
|
||||||
GetECPoint(self, point);
|
GetECPoint(self, point);
|
||||||
GetECPointGroup(self, group);
|
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)
|
if (EC_POINT_make_affine(group, point, ossl_bn_ctx) != 1)
|
||||||
ossl_raise(cEC_POINT, "EC_POINT_make_affine");
|
ossl_raise(cEC_POINT, "EC_POINT_make_affine");
|
||||||
|
#endif
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче