Граф коммитов

43 Коммитов

Автор SHA1 Сообщение Дата
nobu 4e44f6ef86 [DOC] replace Fixnum with Integer [ci skip]
* numeric.c: [DOC] update document for Integer class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-26 06:11:23 +00:00
rhe a128c0d33f openssl: import v2.0.0.beta.2
* {ext,test}/openssl: Import Ruby/OpenSSL 2.0.0.beta.2. The full commit
  history since v2.0.0.beta.1 can be found at:
  https://github.com/ruby/openssl/compare/v2.0.0.beta.1...v2.0.0.beta.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-08 01:09:19 +00:00
svn 09848085e7 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29 05:47:11 +00:00
rhe c9dc0164b8 import Ruby/OpenSSL 2.0.0.beta.1
* NEWS, {ext,test,sample}/openssl: Import Ruby/OpenSSL 2.0.0.beta.1.
  ext/openssl is now converted into a default gem. The full commit
  history since r55538 can be found at:
  https://github.com/ruby/openssl/compare/08e1881f5663...v2.0.0.beta.1
  [Feature #9612]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29 05:47:09 +00:00
rhe be1baf4a9a openssl: implement initialize_copy method for PKey classes
* ext/openssl/ossl_pkey_dh.c, ext/openssl/ossl_pkey_dsa.c,
  ext/openssl/ossl_pkey_ec.c, ext/openssl/ossl_pkey_rsa.c: Implement
  initialize_copy method for OpenSSL::PKey::*.
  [ruby-core:75504] [Bug #12381]

* test/openssl/test_pkey_dh.rb, test/openssl/test_pkey_dsa.rb,
  test/openssl/test_pkey_ec.rb, test/openssl/test_pkey_rsa.rb: Test they
  actually copy the OpenSSL objects, and modifications to cloned object
  don't affect the original object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-19 09:29:59 +00:00
rhe 63abe00785 openssl: adapt OpenSSL::PKey to OpenSSL 1.1.0 opaque structs
* ext/openssl/openssl_missing.[ch]: Implement EVP_PKEY_get0_*() and
  {RSA,DSA,EC_KEY,DH}_get0_*() functions.
  OpenSSL 1.1.0 makes EVP_PKEY/RSA/DSA/DH opaque. We used to provide
  setter methods for each parameter of each PKey type, for example
  PKey::RSA#e=, but this is no longer possible because the new API
  RSA_set0_key() requires the 'n' at the same time. This commit adds
  deprecation warning to them and adds PKey::*#set_* methods as direct
  wrapper for those new APIs. For example, 'rsa.e = 3' now needs to be
  rewritten as 'rsa.set_key(rsa.n, 3, rsa.d)'.
  [ruby-core:75225] [Feature #12324]

* ext/openssl/ossl_pkey*.[ch]: Use the new accessor functions. Implement
  RSA#set_{key,factors,crt_params}, DSA#set_{key,pqg}, DH#set_{key,pqg}.
  Emit a warning with rb_warning() when old setter methods are used.

* test/drb/ut_array_drbssl.rb, test/drb/ut_drb_drbssl.rb,
  test/rubygems/test_gem_remote_fetcher.rb: Don't set a priv_key for DH
  object that are used in tmp_dh_callback. Generating a new key pair
  every time should be fine - actually the private exponent is ignored
  in OpenSSL >= 1.0.2f/1.0.1r even if we explicitly set.
  https://www.openssl.org/news/secadv/20160128.txt

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-05 15:00:47 +00:00
rhe cf2792d591 openssl: drop OpenSSL 0.9.6/0.9.7 support
* ext/openssl, test/openssl: Drop OpenSSL < 0.9.8 support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-25 08:50:03 +00:00
rhe 85500b6634 openssl: add EC.generate
* ext/openssl/ossl_pkey_ec.c (ec_key_new_from_group): Create a new
  EC_KEY on given EC group. Extracted from ossl_ec_key_initialize().
  (ossl_ec_key_s_generate): Added. Create a new EC instance and
  generate a random private and public key.
  (ossl_ec_key_initialize): Use ec_key_new_from_group().
  (Init_ossl_ec): Define the new method EC.generate. This change is
  for consistency with other PKey types.  [ruby-core:45541] [Bug #6567]

* test/openssl/test_pkey_ec.rb: Test that EC.generate works.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-24 16:30:15 +00:00
rhe 8cbd74a362 openssl: rename EC#generate_key to EC#generate_key!
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_generate_key): Fix up RDoc.
  (Init_ossl_ec): Rename EC#generate_key to EC#generate_key!. Make the
  old name an alias of #generate_key!. This change is for consistency
  with other PKey types.  [ruby-core:45541] [Bug #6567]

* test/openssl/test_pkey_ec.rb: Use EC#generate_key! instead of
  EC#generate_key.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-24 16:27:11 +00:00
rhe 582fa9cde9 openssl: use StringValueCStr() where NUL-terminated string is expected
* ext/openssl/ossl_asn1.c, ext/openssl/ossl_bn.c,
  ext/openssl/ossl_cipher.c, ext/openssl/ossl_digest.c
  ext/openssl/ossl_engine.c, ext/openssl/ossl_ns_spki.c
  ext/openssl/ossl_pkcs12.c, ext/openssl/ossl_pkcs7.c
  ext/openssl/ossl_pkey.c, ext/openssl/ossl_pkey_ec.c
  ext/openssl/ossl_rand.c, ext/openssl/ossl_ssl.c
  ext/openssl/ossl_x509attr.c, ext/openssl/ossl_x509cert.c
  ext/openssl/ossl_x509ext.c, ext/openssl/ossl_x509store.c: Use
  StringValueCStr() where NUL-terminated string is expected.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-23 11:40:07 +00:00
rhe 7c971e61f0 openssl: add OpenSSL::PKey::EC#private? and #public?
* ext/openssl/ossl_pkey_ec.c: rename PKey::EC#private_key? and
  #public_key? to #private? and #public? for consistency with other
  PKey types. Old names remain as alias.  [ruby-core:45541] [Bug #6567]

* test/openssl/test_pkey_ec.rb (test_check_key): check private? and
  public? works correctly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21 05:30:48 +00:00
rhe f52ab6e494 openssl: improve handling of password for encrypted PEM
* ext/openssl/ossl.c (ossl_pem_passwd_value): Added. Convert the
  argument to String with StringValue() and validate the length is in
  4..PEM_BUFSIZE. PEM_BUFSIZE is a macro defined in OpenSSL headers.
  (ossl_pem_passwd_cb): When reading/writing encrypted PEM format, we
  used to pass the password to PEM_def_callback() directly but it was
  problematic. It is not NUL character safe. And surprisingly, it
  silently truncates the password to 1024 bytes.  [GH ruby/openssl#51]

* ext/openssl/ossl.h: Add function prototype declaration of newly
  added ossl_pem_passwd_value().

* ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): Use
  ossl_pem_passwd_value() to validate the password String.

* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize, ossl_dsa_export):
  ditto.

* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize,
  ossl_ec_key_to_string): ditto.

* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize, ossl_rsa_export):
  ditto.

* test/openssl/test_pkey_{dsa,ec,rsa}.rb: test this.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20 15:05:25 +00:00
nobu 3f991534d4 ossl_pkey_ec.c: index types
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): fix index types.
  Array length is long, not int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 04:36:02 +00:00
rhe d66e88dc2c openssl: report errors in OpenSSL error queue when clear it
* ext/openssl/ossl.c (ossl_clear_error): Extracted from
  ossl_make_error(). This prints errors in the OpenSSL error queue if
  OpenSSL.debug is true, and clears the queue.
  (ossl_make_error): use ossl_clear_error().

* ext/openssl/ossl.h: add prototype declaration of ossl_make_error().
  (OSSL_BIO_reset) use ossl_clear_error() to clear the queue. Clearing
  silently makes debugging difficult.

* ext/openssl/ossl_engine.c (ossl_engine_s_by_id): ditto.

* ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): ditto.

* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): ditto.

* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize): ditto.

* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto.
  (ossl_ec_group_initialize): ditto.

* ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 04:07:45 +00:00
rhe 01801f2afd ext/openssl: refactor OpenSSL::PKey::EC::Point#mul
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): Validate the
  arguments before passing to EC_POINT(s)_mul(). Add description of this
  method.  [ruby-core:65152] [Bug #10268]

* test/openssl/test_pkey_ec.rb (test_ec_point_mul): Test that
  OpenSSL::PKey::EC::Point#mul works.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 02:55:46 +00:00
nobu 451fe269e5 openssl: wrapper object before alloc
* ext/openssl: make wrapper objects before allocating structs to
  get rid of potential memory leaks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-29 05:55:02 +00:00
nobu 2e78e44f59 ossl_pkey_ec.c: typed data
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_type): use typed data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 23:19:24 +00:00
nobu 13448fdc6b ossl_pkey_ec.c: typed data
* ext/openssl/ossl_pkey_ec.c (ossl_ec_group_type): use typed data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 23:19:13 +00:00
nobu 5540c1de81 ext: protoize no-arguments functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-04 23:09:32 +00:00
emboss 0d58bb5598 * ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds of
OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not
  defined.
* test/openssl/test_pkey_ec.rb: Iterate over built-in curves
  (and assert their non-emptiness!) instead of hard-coding them, as
  this may cause problems with respect to the different availability
  of individual curves in individual OpenSSL builds.
  [ruby-core:54881] [Bug #8384]

  Thanks to Vit Ondruch for providing the patch!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05 22:46:42 +00:00
zzak a152c41e53 * ext/openssl/*: Document synonymous methods, by windwiny [GH-277]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-16 02:24:09 +00:00
usa 04051396fd * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): nonstatic initializer
of an aggregate type is a C99ism.

* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): get rid of VC++
  warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11 03:46:37 +00:00
nobu 7bca2f031a get rid of warnings
* io.c (sysopen_func, rb_sysopen_internal): cast through VALUE to get
  rid of warnings.  fixup of r36355.
* process.c (rb_waitpid_blocking, rb_waitpid): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11 03:17:35 +00:00
emboss 3ffd8a918f * ext/openssl/ossl_pkey_ec.c
test/openssl/test_pkey_ec.rb: Add support for EC_POINT_mul.
  Patch provided by Sambasiva Suda. Thanks!
  [ruby-core:44408][ruby-trunk - Feature #6310]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 02:38:40 +00:00
emboss 5bd7899b98 * ext/openssl/ossl.c
ext/openssl/ossl_pkey_rsa.c
  ext/openssl/ossl_pkey_dsa.c
  ext/openssl/ossl_pkey_ec.c: Forbid export passwords that are less
  than four characters long, as OpenSSL itself does not allow this.
  Issue found by Eric Hodel.
* ext/openssl/ossl_pkey_ec.c: Add export as an alias of to_pem,
  following the PKey interface contract.
* test/openssl/test_pkey_dsa.rb
  test/openssl/test_pkey_rsa.rb
  test/openssl/test_pkey_ec.rb: Add tests that assert correct
  behaviour when dealing with passwords that are less than four
  characters long.
  [ruby-core: 42281][ruby-trunk - Bug #5951]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 01:23:21 +00:00
drbrain da39d32f60 * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
reaches end of non-void function" warnings.  [ruby-trunk - Bug #6066]
* re.c (name_to_backref_number):  ditto.
* object.c (rb_Float):  ditto.
* io.c (io_readpartial):  ditto.
* io.c (io_read_nonblock):  ditto.
* pack.c (rb_uv_to_utf8):  ditto.
* proc.c (rb_method_entry_arity):  ditto.
* vm_method.c (rb_f_notimplement):  ditto.
* struct.c (rb_struct_aset_id):  ditto.
* class.c (rb_scan_args):  ditto.
* process.c (rlimit_resource_type):  ditto.
* process.c (rlimit_resource_value):  ditto.
* process.c (p_uid_switch):  ditto.
* process.c (p_gid_switch):  ditto.
* ext/digest/digest.c (rb_digest_instance_update):  ditto.
* ext/digest/digest.c (rb_digest_instance_finish):  ditto.
* ext/digest/digest.c (rb_digest_instance_reset):  ditto.
* ext/digest/digest.c (rb_digest_instance_block_length):  ditto.
* ext/bigdecimal/bigdecimal.c (BigDecimalCmp):  ditto.
* ext/dl/handle.c (rb_dlhandle_close):  ditto.
* ext/tk/tcltklib.c (pending_exception_check0):  ditto.
* ext/tk/tcltklib.c (pending_exception_check1):  ditto.
* ext/tk/tcltklib.c (ip_cancel_eval_core):  ditto.
* ext/tk/tcltklib.c (lib_get_reltype_name):  ditto.
* ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core):  ditto.
* ext/tk/tkutil/tkutil.c (tk_hash_kv):  ditto.
* ext/openssl/ossl_ssl.c (ossl_ssl_session_reused):  ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1):  ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit):  ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve):  ditto.
* ext/fiddle/conversions.c (generic_to_value):  ditto.
* ext/socket/raddrinfo.c (rsock_io_socket_addrinfo):  ditto.
* ext/socket/socket.c (sock_s_getnameinfo):  ditto.
* ext/ripper/eventids2.c (ripper_token2eventid):  ditto.
* cont.c (return_fiber):  ditto.
* dmydln.c (dln_load):  ditto.
* vm_insnhelper.c (vm_search_normal_superclass):  ditto.
* bignum.c (big_fdiv):  ditto.
* marshal.c (r_symlink):  ditto.
* marshal.c (r_symbol):  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 23:45:37 +00:00
emboss 26cb830df9 * ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER
fallback scenarios.

* ext/openssl/ossl_pkey_dsa.c
* ext/openssl/ossl_x509req.c
* ext/openssl/ossl_pkey_rsa.c
* ext/openssl/ossl_pkey_ec.c
* ext/openssl/ossl_ssl_session.c
* ext/openssl/ossl_x509crl.c
* ext/openssl/ossl_pkey.c
* ext/openssl/ossl_pkey_dh.c
* ext/openssl/ossl_x509cert.c
* ext/openssl/ossl_pkcs7.c: Use OSSL_BIO_reset.

* ext/openssl/ossl_ssl.c
* ext/openssl/ossl_cipher.c
* ext/openssl/ossl_pkey_ec.c
* ext/openssl/ossl_pkcs12.c
* ext/openssl/ossl_ssl_session.c: Replace rb_raise occurences by
  ossl_raise. This automatically flushes OpenSSL's error queue.

* ext/openssl/ossl_pkcs7.c: Raise error if DER fallback for parsing
  fails.

* test/openssl/test_pkey_ec.rb
* test/openssl/test_pkey_dsa.rb
* test/openssl/test_pkey_rsa.rb: Add assertions that OpenSSL.errors is
  empty.

* test/openssl/test_pkey_rsa.rb: Remove initial OpenSSL.errors call in
  test_new.
  [ Ruby 1.9 - Bug #4885 ] [ruby-core:37134]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 08:41:08 +00:00
emboss f14d97e1c0 Thu May 12 08:01:14 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
* ext/openssl/ossl_pkey_ec.c: Allow encryption when PEM-encoding 
	  Elliptic Curve private keys.
	  [ruby-core:35329] [Bug #4423]

Previous revision: 31525



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-11 23:05:29 +00:00
naruse d5b1fde5c7 * ext/openssl/ossl_pkey_dh.c (ossl_dh_initialize):
pop pushed error after each try of reading. fixes #4550

* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize): ditto.

* ext/openssl/ossl_pkey_ec.c (ossl_ec_initialize): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-06 06:14:05 +00:00
naruse 3a16cc24e8 * ext/openssl/ossl.c: surpress warning: shorten-64-to-32.
* ext/openssl/ossl.h: ditto.

* ext/openssl/ossl_asn1.c: ditto.

* ext/openssl/ossl_bio.c: ditto.

* ext/openssl/ossl_bn.c: ditto.

* ext/openssl/ossl_cipher.c: ditto.

* ext/openssl/ossl_hmac.c: ditto.

* ext/openssl/ossl_ns_spki.c: ditto.

* ext/openssl/ossl_ocsp.c: ditto.

* ext/openssl/ossl_pkcs5.c: ditto.

* ext/openssl/ossl_pkey.c: ditto.

* ext/openssl/ossl_pkey_dh.c: ditto.

* ext/openssl/ossl_pkey_dsa.c: ditto.

* ext/openssl/ossl_pkey_ec.c: ditto.

* ext/openssl/ossl_pkey_rsa.c: ditto.

* ext/openssl/ossl_rand.c: ditto.

* ext/openssl/ossl_ssl.c: ditto.

* ext/openssl/ossl_x509ext.c: ditto.

* ext/openssl/ossl_x509name.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-24 07:29:21 +00:00
akr dd9f5e8714 * ext/openssl/ossl_pkey_ec.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 13:21:31 +00:00
wanabe 7b77b436f0 * ext/openssl/ossl_hmac.c (ossl_hmac_hexdigest, ossl_hmac_s_hexdigest),
ext/openssl/ossl_pkey_ec.c (ossl_ec_group_set_seed),
  ext/openssl/ossl_ssl_session.c (ossl_ssl_session_to_der),
  ext/openssl/ossl_pkcs7.c (numberof): suppress warnings.
  [ruby-core:31932]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-26 13:24:52 +00:00
nobu bcd0bcc390 * test/openssl/test_ec.rb: added test_dsa_sign_asn1_FIPS186_3. dgst is
truncated with ec_key.group.order.size after openssl 0.9.8m for
  FIPS 186-3 compliance.

  WARNING: ruby-openssl aims to wrap an OpenSSL so when you're using
  openssl 0.9.8l or earlier version, EC.dsa_sign_asn1 raises
  OpenSSL::PKey::ECError as before and EC.dsa_verify_asn1 just returns
  false when you pass dgst longer than expected (no truncation
  performed).

* ext/openssl/ossl_pkey_ec.c: rdoc typo fixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06 10:13:46 +00:00
nobu d0e5a34ac7 * ext/**/*.[ch]: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:21:01 +00:00
nobu 977267c2e0 * ext/**/*.[ch]: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:04:13 +00:00
akr ef2ff2776b * ext/openssl/ossl_digest.c (GetDigestPtr): use StringValueCStr
instead of STR2CSTR.

* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto.
  (ossl_ec_group_initialize): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 05:55:25 +00:00
mame f0c8c9d832 * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out
fragments of unused code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 13:56:51 +00:00
nobu 6c0f540298 * ext/openssl: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 15:34:23 +00:00
ko1 72ba13aa8e * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c,
  io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c,
  string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c,
  vm.c, gc.c:
  allocated memory objects by xmalloc (ruby_xmalloc) should be
  freed by xfree (ruby_xfree).
* ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
  ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c,
  ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c,
  ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c,
  ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c:
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08 10:01:40 +00:00
technorama 161b45f59c * ext/openssl/ossl_{ec,dh,dsa,rsa}.c: Remove useless warnings.
* ext/openssl/ossl_asn1.c: Simplify code.

* ext/openssl/ossl_ssl_session.c Fix compiler warnings.
  Undefine #id if SSL_SESSION_get_id is not supported.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26 07:07:26 +00:00
technorama 9fa80b19a6 * 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
2007-06-18 08:56:21 +00:00
usa 31088109b7 * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_get_group): get rid of
warning. we are aware of it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-06 01:58:01 +00:00
technorama 8b95ee24de * ext/openssl/ossl_bn.c: More documentation.
* ext/openssl/lib/ossl_{pkey,pkey_ec}.[ch]: Add elliptic curves.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 07:02:44 +00:00