diff options
Diffstat (limited to 'OpenSSL/PKey/EC/Point.html')
-rw-r--r-- | OpenSSL/PKey/EC/Point.html | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSSL/PKey/EC/Point.html b/OpenSSL/PKey/EC/Point.html index 706be750..962087ce 100644 --- a/OpenSSL/PKey/EC/Point.html +++ b/OpenSSL/PKey/EC/Point.html @@ -418,7 +418,7 @@ ossl_ec_point_initialize_copy(VALUE self, VALUE other) </div> <div class="method-description"> - + <p>This method is deprecated and should not be used. This is a no-op.</p> <div class="method-source-code" id="make_affine-21-source"> <pre>static VALUE ossl_ec_point_make_affine(VALUE self) @@ -429,8 +429,11 @@ ossl_ec_point_initialize_copy(VALUE self, VALUE other) 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; }</pre> @@ -485,6 +488,10 @@ ossl_ec_point_initialize_copy(VALUE self, VALUE other) if (EC_POINT_mul(group, point_result, bn_g, point_self, bn, ossl_bn_ctx) != 1) ossl_raise(eEC_POINT, NULL); } else { +#if (defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3) || defined(LIBRESSL_VERSION_NUMBER) + rb_raise(rb_eNotImpError, "calling #mul with arrays is not" \ + "supported by this OpenSSL version"); +#else /* * bignums | arg1[0] | arg1[1] | arg1[2] | ... * points | self | arg2[0] | arg2[1] | ... @@ -499,6 +506,9 @@ ossl_ec_point_initialize_copy(VALUE self, VALUE other) if (RARRAY_LEN(arg1) != RARRAY_LEN(arg2) + 1) /* arg2 must be 1 larger */ ossl_raise(rb_eArgError, "bns must be 1 longer than points; see the documentation"); + rb_warning("OpenSSL::PKey::EC::Point#mul(ary, ary) is deprecated; " \ + "use #mul(bn) form instead"); + num = RARRAY_LEN(arg1); bns_tmp = rb_ary_tmp_new(num); bignums = ALLOCV_N(const BIGNUM *, tmp_b, num); @@ -524,6 +534,7 @@ ossl_ec_point_initialize_copy(VALUE self, VALUE other) ALLOCV_END(tmp_b); ALLOCV_END(tmp_p); +#endif } return result; @@ -615,7 +626,7 @@ ossl_ec_point_initialize_copy(VALUE self, VALUE other) <p>See <a href="Point.html#method-i-to_octet_string"><code>to_octet_string</code></a> for more information.</p> <div class="method-source-code" id="to_bn-source"> - <pre><span class="ruby-comment"># File lib/openssl/pkey.rb, line 33</span> + <pre><span class="ruby-comment"># File lib/openssl/pkey.rb, line 299</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_bn</span>(<span class="ruby-identifier">conversion_form</span> = <span class="ruby-identifier">group</span>.<span class="ruby-identifier">point_conversion_form</span>) <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">BN</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">to_octet_string</span>(<span class="ruby-identifier">conversion_form</span>), <span class="ruby-value">2</span>) <span class="ruby-keyword">end</span></pre> |