summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl.h
AgeCommit message (Collapse)Author
2017-11-25openssl: import v2.1.0.beta2rhe
Import Ruby/OpenSSL 2.1.0.beta2. The full commit log since commit e72d960db262 which was imported by r60013 can be found at: https://github.com/ruby/openssl/compare/e72d960db262...v2.1.0.beta2 ---------------------------------------------------------------- Kazuki Yamaguchi (26): bn: use ALLOCV() macro instead of xmalloc() appveyor.yml: remove 'openssl version' line test/test_ssl_session: skip tests for session_remove_cb x509ext: implement X509::Extension#== x509attr: implement X509::Attribute#== x509cert: implement X509::Certificate#== x509revoked: add missing X509::Revoked#to_der x509crl, x509revoked: implement X509::{CRL,Revoked}#== x509req: implement X509::Request#== ssl: extract rb_intern("call") cipher: disallow setting AAD for non-AEAD ciphers test/test_cipher: fix test_non_aead_cipher_set_auth_data failure ssl: fix conflict of options in SSLContext#set_params buffering: let #write accept multiple arguments pkey: make pkey_check_public_key() non-static x509cert, x509crl, x509req, ns_spki: check sanity of public key test/envutil: port assert_warning from Ruby trunk test/utils: remove a pointless .public_key call in issue_cert ssl: add SSLContext#add_certificate test/test_ssl: fix test_security_level Drop support for LibreSSL 2.4 kdf: add HKDF support test/test_x509cert: fix flaky test test/test_x509crl: fix random failure History.md: fix a typo Ruby/OpenSSL 2.1.0.beta2 Mark Wright (1): Fix build failure against OpenSSL 1.1 built with no-deprecated Thanks rhenium for the code review and fixes. Peter Karman (1): Add RSA sign_pss() and verify_pss() methods aeris (1): TLS Fallback Signaling Cipher Suite Value kazu (1): Use caller with length to reduce unused strings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-03openssl: import v2.1.0.beta1rhe
Import Ruby/OpenSSL 2.1.0.beta1. The full commit log since v2.0.5 (imported by r59567) can be found at: https://github.com/ruby/openssl/compare/v2.0.5...v2.1.0.beta1 ---------------------------------------------------------------- Antonio Terceiro (1): test/test_ssl: explicitly accept TLS 1.1 in corresponding test Colby Swandale (1): document using secure protocol to fetch git master in Bundler Colton Jenkins (1): Add fips_mode_get to return fips_mode Kazuki Yamaguchi (85): Start preparing for 2.1.0 Remove support for OpenSSL 0.9.8 and 1.0.0 bn: refine tests bn: implement unary {plus,minus} operators for OpenSSL::BN bn: implement OpenSSL::BN#negative? Don't define main() when built with --enable-debug test: let OpenSSL::TestCase include OpenSSL::TestUtils test: prepare test PKey instances on demand Add OpenSSL.print_mem_leaks Enable OSSL_MDEBUG on CI builds ssl: move default DH parameters from OpenSSL::PKey::DH Make exceptions with the same format regardless of OpenSSL.debug ssl: show reason of 'certificate verify error' in exception message ssl: remove OpenSSL::ExtConfig::TLS_DH_anon_WITH_AES_256_GCM_SHA384 ssl: do not confuse different ex_data index registries ssl: assume SSL/SSL_CTX always have a valid reference to the Ruby object Fix RDoc markup ssl: suppress compiler warning ext/openssl/deprecation.rb: remove broken-apple-openssl extconf.rb: print informative message if OpenSSL can't be found Rakefile: compile the extension before test kdf: introduce OpenSSL::KDF module ossl.h: add NUM2UINT64T() macro kdf: add scrypt Expand rb_define_copy_func() macro Expand FPTR_TO_FD() macro Remove SafeGet*() macros cipher: rename GetCipherPtr() to ossl_evp_get_cipherbyname() digest: rename GetDigestPtr() to ossl_evp_get_digestbyname() Add ossl_str_new(), an exception-safe rb_str_new() bio: simplify ossl_membio2str() using ossl_str_new() Remove unused functions and macros Drop support for LibreSSL 2.3 ocsp: add OpenSSL::OCSP::Request#signed? asn1: infinite length -> indefinite length asn1: rearrange tests ssl: remove a needless NULL check in SSL::SSLContext#ciphers ssl: return nil in SSL::SSLSocket#cipher if session is not started asn1: remove an unnecessary function prototype asn1: require tag information when instantiating generic type asn1: initialize 'unused_bits' attribute of BitString with 0 asn1: check for illegal 'unused_bits' value of BitString asn1: disallow NULL to be passed to asn1time_to_time() asn1: avoid truncating OID in OpenSSL::ASN1::ObjectId#oid asn1: allow constructed encoding with definite length form asn1: prohibit indefinite length form for primitive encoding asn1: allow tag number to be >= 32 for universal tag class asn1: use ossl_asn1_tag() asn1: clean up OpenSSL::ASN1::Constructive#to_der asn1: harmonize OpenSSL::ASN1::*#to_der asn1: prevent EOC octets from being in the middle of the content asn1: do not treat EOC octets as part of content octets x509name: add 'loc' and 'set' kwargs to OpenSSL::X509::Name#add_entry ssl: do not call session_remove_cb during GC Backport "Merge branch 'topic/test-memory-leak'" to maint cipher: update the documentation for Cipher#auth_tag= Rakefile: let sync:to_ruby know about test/openssl/fixtures test: fix formatting test/utils: remove OpenSSL::TestUtils.silent test/utils: add SSLTestCase#tls12_supported? test/utils: have start_server yield only the port number test/utils: do not set ecdh_curves in start_server test/utils: let server_loop close socket test/utils: improve error handling in start_server test/utils: add OpenSSL::TestUtils.openssl? and .libressl? test/utils: do not use DSA certificates in SSL tests test/test_ssl: remove test_invalid_shutdown_by_gc test/test_ssl: move test_multibyte_read_write to test_pair test/test_ssl_session: rearrange tests test/test_pair, test/test_ssl: fix for TLS 1.3 ssl: remove useless call to rb_thread_wait_fd() ssl: fix NPN support ssl: mark OpenSSL::SSL::SSLContext::DEFAULT_{1024,2048} as private ssl: use 2048-bit group in the default tmp_dh_cb ssl: ensure that SSL option flags are non-negative ssl: update OpenSSL::SSL::OP_* flags ssl: prefer TLS_method() over SSLv23_method() ssl: add SSLContext#min_version= and #max_version= ssl: rework SSLContext#ssl_version= test/test_x509name: change script encoding to ASCII-8BIT x509name: refactor OpenSSL::X509::Name#to_s x509name: add OpenSSL::X509::Name#to_utf8 x509name: add OpenSSL::X509::Name#inspect x509name: update regexp in OpenSSL::X509::Name.parse Ruby/OpenSSL 2.1.0.beta1 Marcus Stollsteimer (1): Fix rdoc for core Integer class nobu (4): [DOC] {read,write}_nonblock with exception: false [DOC] keyword argument _exception_ [DOC] mark up literals Revert r57690 except for read_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30openssl: import v2.0.0rhe
Import Ruby/OpenSSL 2.0.0. The full commit history since 2.0.0 beta.2 (imported at r56098) can be found at: https://github.com/ruby/openssl/compare/v2.0.0.beta.2...v2.0.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29import Ruby/OpenSSL 2.0.0.beta.1rhe
* 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-05-25openssl: drop OpenSSL 0.9.6/0.9.7 supportrhe
* 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-25openssl: remove unnecessary 'extern "C"' blocks from local headersrhe
* ext/openssl/openssl_missing.h, ext/openssl/ossl.h: Remove unnecessary 'extern "C"' blocks. We don't use C++ and these headers are local to ext/openssl, so there is no need to enclose with it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-24openssl: avoid deprecated M_ASN1_* macrosrhe
* ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): Use ASN1_OCTET_STRING_set() instead of M_ASN1_OCTET_STRING_set(). Macros prefixed by "M_" are discouraged to be used from outside OpenSSL library[1]. (ossl_x509ext_get_value): Likewise, use ASN1_STRING_print() instead of M_ASN1_OCTET_STRING_print(). [1] https://git.openssl.org/gitweb/?p=openssl.git;a=blob;f=CHANGES;h=bf61913d7b01212b4d8b2f3c13d71d645914f67c;hb=b6079a7835f61daa9fb2cbf9addfa86049523933#l878 * ext/openssl/ossl.h: Include openssl/asn1.h instead of openssl/asn1_mac.h. It just includes openssl/asn1.h and defines some additional "M_" macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20openssl: improve handling of password for encrypted PEMrhe
* 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-19openssl: register ex_data index for X509_STORE{_CTX,} respectivelyrhe
* ext/openssl/ossl.c (Init_openssl): register an ex_data index for X509_STORE and X509_STORE_CTX respectively. Since they don't share the ex_data index registry, we can't use the same index. (ossl_verify_cb): use the the correct index. * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. (ossl_x509stctx_verify): ditto. * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations of ossl_store_{ctx_,}ex_verify_cb_idx. * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and X509_STORE_get_ex_data. * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18openssl: report errors in OpenSSL error queue when clear itrhe
* 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
2015-11-21* ext/openssl/ossl.h: LibreSSL doesn't have and need e_os2.h.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-22* ext/openssl/*: Remove svn commit id macros to make sync easierzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20* ext/openssl/*: use license instead of licence.hsbt
[fix GH-876][ci skip] Patch by @davydovanton * lib/net/https.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03* ext/openssl/ossl.h: avoid to build failure of Windows environment.hsbt
* ext/openssl/ossl_ssl_session.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03* ext/openssl/ossl.h: Make `SSL_SESSION_cmp` use `CRYPTO_memcmp`hsbt
[fix GH-591] Patch by @PiPeep * ext/openssl/ossl_ssl_session.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13openssl/ossl.h: calculate as longnobu
* ext/openssl/ossl.h (ossl_str_adjust): calculate as long, not casting to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13ext: use PRIsVALUE for rb_raise and rb_warnnobu
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): use PRIsVALUE for rb_raise() and rb_warn(). * ext/openssl/ossl_cipher.c (ossl_cipher_init): ditto. * ext/racc/cparse/cparse.c (extract_user_token): ditto. * ext/syslog/syslog.c (mSyslog_log): ditto. * ext/openssl/ossl.h (OSSL_Check_Kind, OSSL_Check_Instance): now ossl_raise() also accepts PRIsVALUE. * ext/openssl/ossl_asn1.c (ossl_asn1_default_tag): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-09* file.c, ext/etc/etc.c, ext/socket/unixsocket.c,akr
ext/openssl/ossl.h, ext/openssl/openssl_missing.c: Use HAVE_AGGREGATE_MEMBER instead of HAVE_ST_MEMBER. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10rb_thread_call_without_gvlnobu
* include/ruby/thread.h: new header file for thread stuff. * thread.c (rb_thread_call_without_gvl): export. [Feature#4328] returns void* instead of VALUE. [Feature #5543] * thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10* ext/openssl/ossl.cemboss
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
2011-07-08* ext/openssl/ossl.h: include openssl/e_os2.h before checking theusa
defition of OPENSSL_SYS_WIN32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30* ext/openssl/ossl.c/.h: Added ossl_x509_name_sk2ary.emboss
* ext/openssl/ossl.c: Replaced ossl_x509_ary2k by generic macro to simplify future conversions. * ext/openssl/ossl_ssl.c: Implement SSLSocket#client_ca. * test/openssl/test_ssl.rb: Add test for SSLSocket#client_ca. Thanks to Ippei Obayashi for providing the patch! [ Ruby 1.9 - Feature #4481 ] [ruby-core:35461] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29* ext/openssl/ossl.h (OPENSSL_SYS_WIN32): define only if not defined.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29* ext/openssl/ossl.h (OPENSSL_SYS_WIN32): support for mingw(msys).eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22* ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DERemboss
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-03-24* ext/openssl/ossl.c: surpress warning: shorten-64-to-32.naruse
* 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-02-17* ext/openssl/ossl.h: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28* openssl/ossl.c (OSSL_IMPL_SK2ARY): for OpenSSL 1.0.naruse
patched by Jeroen van Meeuwen at [ruby-core:25210] fixed by Nobuyoshi Nakada [ruby-core:25238], Hongli Lai [ruby-core:27417], and Motohiro KOSAKI [ruby-core:28063] * ext/openssl/ossl_ssl.c (ossl_ssl_method_tab), (ossl_ssl_cipher_to_ary): constified. * ext/openssl/ossl_pkcs7.c (pkcs7_get_certs, pkcs7_get_crls): split pkcs7_get_certs_or_crls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19* io.c (rb_mWaitReadable): defined.akr
(rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* ext/openssl: suppress warnings.akr
* ext/openssl/ossl.h (OSSL_Debug): don't use gcc extention for variadic macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26* ext/curses/curses.c: should include <ruby/io.h>.matz
* ext/io/wait/wait.c: ditto. * ext/openssl/ossl.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22* ext/openssl: suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15* ext/dl/cfunc.c (rb_dlcfunc_call): adjust format. [ruby-dev:31222]nobu
* ext/digest/digest.c (rb_digest_instance_update, rb_digest_instance_finish, rb_digest_instance_reset, rb_digest_instance_block_length): %s in rb_raise() expects char*. [ruby-dev:31222] * ext/openssl/ossl.h: include ossl_pkcs5.h. [ruby-dev:31231] * ext/openssl/ossl_pkcs5.h: new file for PKCS5. [ruby-dev:31231] * ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise() instead of rb_raise(). [ruby-dev:31222] * ext/sdbm/_sdbm.c: DOSISH platforms need io.h. [ruby-dev:31232] * ext/syck/syck.h: include stdlib.h for malloc() and free(). [ruby-dev:31232] * ext/syck/syck.h (syck_parser_set_input_type): prototype added. [ruby-dev:31231] * win32/win32.c: include mbstring.h for _mbspbrk(). [ruby-dev:31232] * include/ruby/win32.h (rb_w32_getcwd): prototype added. [ruby-dev:31232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-02* ext/openssl/{ossl.[ch],ossl_pkey.c} Add documentation.technorama
* ext/openssl/ossl_hmac.c Add reset method. * ext/openssl/ossl_cipher.c (Cipher#update) Take additional buffer argument. * ext/openssl/{ossl_bio.c,ossl_ssl.c,ruby_missing.h} compatibility with 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24* file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t):nobu
renamed from OpenFile. * ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h, ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c, ext/readline/readline.c, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* ruby.h (struct RString): embed small strings.matz
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-27* ext/openssl/ossl.h: move <ruby.h> inclusion point to shut upmatz
Solaris compiler. [ruby-core:08114] * time.c (time_to_s): use +0900 style timezone string for local time. [ruby-dev:29143] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-02* ext/openssl/extconf.rb: use create_header.gotoyuzo
* ext/openssl/ossl.h, ext/openssl/openssl_missing.h: include RUBY_EXTCONF_H. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-19* ext/openssl/ossl.h (OSSL_Debug): should not use __func__.gotoyuzo
[ruby-dev:28339] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-07* ext/openssl/ossl.h: need to include winsock2.h before includingusa
windows.h by some openssl headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-19* ext/openssl/openssl_missing.c, ext/openssl/ossl.h,gotoyuzo
ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c, ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid compiler warnings. suggested by Mical Rokos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11* ext/openssl/ossl_pkcs12.[ch]: new files. add OpenSSL::PKCS12.gotoyuzo
* ext/openssl/ossl_ossl.[ch]: ditto. * ext/openssl/MANIFEST: add ossl_pkcs12.[ch]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-11* ext/openssl/ossl.c (ossl_x509_sk2ary, ossl_x509crl_sk2ary): addgotoyuzo
functions to convert STACK into Array. * ext/openssl/ossl.h: add prototypes. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_set_certificates, ossl_pkcs7_get_certificates, ossl_pkcs7_get_crls, ossl_pkcs7_set_crls): add functions for PKCS7#certificates= PKCS7#certificates, PKCS7#crls= and PKCS7#crls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03ossl_asn1.h was included twice.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03* ext/openssl/ossl_asn1.c: add DER encoder and decoder.gotoyuzo
* ext/openssl/ossl_asn1.h: add OpenSSL::ASN1 module. * ext/openssl/ossl.c (Init_openssl): call Init_ossl_asn1. * ext/openssl/ossl.h: include ossl_asn1.h. * ext/openssl/extconf.rb: check if X509_ATTRIBUTE has field "single". * ext/openssl/ossl_x509attr.c (ossl_x509attr_set_value): accept DER encoded data argument. * ext/openssl/ossl_x509attr.c (ossl_x509attr_get_value): return DER encoded data in OpenSSL::ASN1 types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02* ext/openssl/ossl_engine.c: add a new module OpenSSL::Engine.gotoyuzo
it supports OpenSSL hardware cryptographic engine interface. * ext/openssl/ossl_engine.h: ditto. * ext/openssl/MANIFEST: add ossl_engine.c and ossl_engine.h. * ext/openssl/extconf.rb: add check for openssl/engine.h. * ext/openssl/ossl.c: call Init_ossl_engine(). * ext/openssl/ossl.h: include openssl/engine.h. * ext/openssl/ossl_pkey_{rsa,dsa,dh}.c: check if underlying EVP_PKEY referes engine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17* ext/openssl: all files are reviewed to simplify and avoid memory leak.gotoyuzo
* ext/openssl/extconf.rb: add check for assert.h. * ext/openssl/ossl.c (ossl_buf2str): new function to convert C buffer to String and free buffer. * ext/openssl/ossl.c (ossl_x509_ary2sk): new function to convert Array of OpenSSL::X509 to STACK_OF(X509) with exception safe. * ext/openssl/ossl.c (ossl_to_der, ossl_to_der_if_possible): new functions to convert object to DER string. * ext/openssl/ossl.h: ditto. * ext/openssl/ossl_bio.c (ossl_membio2str): new function to convert BIO to String object and free BIO. * ext/openssl/ossl_bio.h: ditto. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_to_der): add for "to_der". * ext/openssl/ossl_x509name.c (ossl_x509name_to_der): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509ext_to_der): ditto. * ext/openssl/ossl_x509ext.c (create_ext_from_array): removed and reimplement in openssl/x509.rb. * ext/openssl/ossl_x509attr.c: reimplemented and disable some method temporarily. this class doesn't work fine without ASN.1 data support;-) I'll rewrite in near future. * ext/openssl/lib/openssl/x509.c (X509::Attribute): get rid off unused code. * ext/openssl/lib/openssl/x509.c (X509::ExtensionFactory): refine all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-12OpenSSL updatemichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-10* eval.c (win32_get_exception_list): avoid VC7 warning.usa
[ruby-win32:577] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08* ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h.gotoyuzo
* ext/openssl/ossl_config.c: refine all with backward compatibility. * ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr(). * ext/openssl/ossl_x509.c: added new constants under X509 module. DEFAULT_CERT_AREA, DEFAULT_CERT_DIR, DEFAULT_CERT_FILE, DEFAULT_CERT_DIR_ENV, DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free the members of the struct. it's left to GC. * ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=. * ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize): add attr readers: issuer_certificate, subject_certificate, subject_request, crl and config. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e