1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/{extconf.rb,ossl_ssl_session.c}:

Fix ruby-Bugs-11513.

* ext/openssl/ossl_pkey_ec.c
  New methods EC::Point.[eql,make_affine!,invert!,on_curve?,infinity?]
  By default output the same key form as the openssl command.

* ext/openssl/ossl_rand.c
  New method Random.status?

* test/openssl/test_ec.rb
  New tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
technorama 2007-06-18 08:56:21 +00:00
parent 1c03862049
commit 9fa80b19a6
6 changed files with 317 additions and 25 deletions

View file

@ -135,6 +135,18 @@ ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len)
return Qtrue;
}
/*
* call-seq:
* status? => true | false
*
* Return true if the PRNG has been seeded with enough data, false otherwise.
*/
static VALUE
ossl_rand_status(VALUE self)
{
return RAND_status() ? Qtrue : Qfalse;
}
#define DEFMETH(class, name, func, argc) \
rb_define_method(class, name, func, argc); \
rb_define_singleton_method(class, name, func, argc);
@ -160,5 +172,6 @@ Init_ossl_rand()
DEFMETH(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1);
DEFMETH(mRandom, "egd", ossl_rand_egd, 1);
DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2);
DEFMETH(mRandom, "status?", ossl_rand_status, 0)
}