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

17 Коммитов

Автор SHA1 Сообщение Дата
nahi 544daf1f7a * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_set_time): Check
argument type with NUM2LONG if the arg is not a Time object.
  See #4919.

* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_set_timeout): Check
  type with NUM2LONG. Time as an arg is not allowed. See #4919.

* test/openssl/test_ssl_session.rb (test_session_time,
  test_session_timeout): Test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-23 10:36:09 +00:00
emboss 8d836a15e4 * ext/openssl/ossl_ssl_session.c: Respect T_BIGNUM time values. Patch by
Tomoyuki Chikanaga.
  [ Ruby 1.9 - Bug #4919 ] [ruby-dev:43869]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 13:28:18 +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
nahi bda678dc5b * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_to_der):
OpenSSL::SSL::Session#to_der was broken. Fix buffer handling.

* test/openssl/test_ssl_session.rb (test_session): Test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 03:43:38 +00:00
akr f085a0b034 * ext/openssl/ossl_ssl_session.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-11 19:13:02 +00:00
drbrain 41bfc7a721 Add toplevel documentation for OpenSSL
Add additional documentation for OpenSSL::SSL::SSLContext and
OpenSSL::SSL::SSLSocket.

Move "let rdoc know about mOSSL" comments so they don't show up in output.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06 00:54:44 +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
usa eaaef6af40 * ext/openssl/ossl_ssl_session.c (SSL_SESSION_cmp): remove static for
loopy version of openssl (0.9.8l?).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23 15:16:02 +00:00
usa 6f7b5ffe6f * ext/openssl/ossl_config.c: OpenSSL 1.0.0 support.
* ext/openssl/extconf.rb: check some functions added/removed at
  OpenSSL 1.0.0.

* ext/openssl/ossl_engine.c (ossl_engine_s_load): use engines which
  exists.

* ext/openssl/ossl_ssl_session (SSL_SESSION_cmp): removed at 1.0.0,
  so implement compatible fuction here.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23 08:37:55 +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
nobu 1f46af14e4 * ext/openssl/openssl_missing.h (i2d_of_void): cast for callbacks.
[ruby-core:22860]

* ext/openssl/ossl_engine.c (ossl_engine_s_by_id): suppress a
  warning.

* ext/openssl/ossl_ssl.c (ossl_sslctx_flush_sessions): time_t may
  be larger than long.

* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_get_time),
  (ossl_ssl_session_get_timeout): use TIMET2NUM() to convert
  time_t.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 07:45:35 +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
knu 55fece6379 * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize):
Add a null check for ssl; submitted by akira yamada
  in [ruby-dev:34950].

* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if
  SSL_OP_NO_TICKET is present; submitted by akira yamada
  in [ruby-dev:34944].

* test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a
  workaround for the case where OpenSSL is configured with
  --enable-tlsext; submitted by akira yamada in [ruby-dev:34944].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05 11:36:55 +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 22405dad92 * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_alloc): should
return value.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-05 06:13:37 +00:00
technorama a05e89ca65 * ext/openssl/ossl_{ssl.[ch],ssl_session.c}},
ext/openssl/lib/openssl/lib/openssl/ssl.rb:
  New SSL::Session class.  Add session cb's, getter/setters,
  config, and statistics methods.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-02 22:10:12 +00:00