aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/openssl_missing.c
Commit message (Collapse)AuthorAgeFilesLines
* ext/openssl: fix ex_data handling for X509_STOREKazuki Yamaguchi2016-04-271-14/+0
| | | | | X509_STORE_get_ex_new_index() is required in addition to X509_STORE_CTX_get_ex_new_index() because they are independent.
* ext/openssl: add SSLContext#set_ecdh_curvesKazuki Yamaguchi2016-04-271-0/+36
| | | | | | | | | | And deprecate #tmp_ecdh_callback. Since SSL_CTX_set_tmp_ecdh_callback() was removed in OpenSSL 1.1.0, we can't provide SSLContext#tmp_ecdh_callback anymore. Instead, we should use SSL_CTX_set1_curves_list() to set the curves and SSL_CTX_set_ecdh_auto() to make OpenSSL select automatically from the list.
* ext/openssl: fix (mainly) opaque related compilation of ossl_x509*.cKazuki Yamaguchi2016-04-271-0/+22
| | | | | | | | | | | | | Fix following files: - ossl_x509attr.c - ossl_x509cert.c - ossl_x509store.c - ossl_x509name.c - ossl_x509req.c - ossl_x509crl.c - ossl_x509revoked.c - ossl_x509ext.c
* ext/openssl: the return type of HMAC_CTX_copy() is intKazuki Yamaguchi2016-04-271-2/+3
|
* ext/openssl: use HMAC_CTX_{new,free,reset} to allocate HMAC_CTXKazuki Yamaguchi2016-04-271-22/+56
| | | | HMAC_CTX is made opaque in OpenSSL 1.1.0
* ext/openssl: use EVP_CIPHER_CTX_{new,free} to allocate EVP_CIPHER_CTXKazuki Yamaguchi2016-04-271-0/+23
| | | | EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0
* ext/openssl: drop support for OPENSSL_NO_HMACKazuki Yamaguchi2016-04-271-5/+1
| | | | | | It has not been actually supported: since ossl.h includes openssl/hmac.h without any guards, it wouldn't compile if OPENSSL_NO_HMAC is enabled.
* ext/openssl: drop support for OpenSSL 0.9.6/0.9.7Kazuki Yamaguchi2016-04-271-295/+14
| | | | | | | | | The last release of OpenSSL 0.9.7 series was over 9 years ago (!) and even 0.9.8/1.0.0 are no longer supported (EOL was 2015-12-31). It actually doesn't compile since r40461 (ext/openssl/ossl_bn.c (ossl_bn_initialize): allow Fixnum and Bignum. [ruby-core:53986] [Feature #8217], 2013-04-25, 2.1.0) and it looks like nobody noticed it.
* ext/openssl: always use our implementation of SSL_SESSION_cmp()Kazuki Yamaguchi2016-04-271-0/+18
| | | | | | | | | Implement CRYPTO_memcmp() if it is not available. Always use our SSL_SESSION_cmp() (renamed to ossl_SSL_SESSION_cmp()). SSL_SESSION_cmp() was removed in OpenSSL 1.0.0 and we have used a reimplemented one. However our implementation is better than the original (it uses CRYPTO_memcmp() instead of plain memcmp).
* * ext/openssl/*: Remove svn commit id macros to make sync easierzzak2015-09-221-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/*: use license instead of licence.hsbt2015-04-201-1/+1
| | | | | | | [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
* * file.c, ext/etc/etc.c, ext/socket/unixsocket.c,akr2013-05-091-2/+2
| | | | | | | | | 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
* * ext/openssl/extconf.rbemboss2011-06-261-0/+12
| | | | | | | | | | | | | * ext/openssl/ossl_missing.h/.c: add ASN1_put_eoc if missing. * ext/openssl/ossl_asn1.c: introduce ossl_asn1_object_size and ossl_asn1_put_object to wrap functionality depending on OpenSSL version in use. Fixes [ Ruby 1.9 - Bug #4916 ] reported by Hiroshi Nakamura. [ruby-core:37286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Fixed wrong check of missing functions. Patch by Adrian Quark.nahi2010-09-061-1/+2
| | | | | | | | | | ref #3400 The patch contains following comment: This patch should avoid unnecessary incompatibility with future versions of Openssl. Changes suggested by bmaher_at_amazon.com. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/**/*.[ch]: removed trailing spaces.nobu2010-04-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/**/*.[ch]: removed trailing spaces.nobu2010-04-221-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/openssl_missing.c (HMAC_CTX_copy): adopted tomatz2008-05-151-7/+5
| | | | | | | | prototype change in openssl bundled with newer OpenBSD. a patch from Takahiro Kambe <taca at back-street.net> in [ruby-dev:34691]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/extconf.rb: use create_header.gotoyuzo2006-06-021-0/+4
| | | | | | | | * 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
* * ext/openssl/openssl_missin.c: include <openssl/engine.h> beforegotoyuzo2005-07-261-4/+4
| | | | | | | | <openssl/x509_vfy.h> to avoid compilation error of mswin32. suggested by NAKAMURA Usaku. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/openssl_missing.c, ext/openssl/ossl.h,gotoyuzo2005-06-191-0/+3
| | | | | | | | | 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
* * ext/openssl/extconf.rb: check for EVP_CIPHER_CTX_copy, ENGINE_add,gotoyuzo2004-06-301-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EVP_CIPHER_CTX_set_padding, EVP_CipherFinal_ex, EVP_CipherInit_ex, EVP_DigestFinal_ex and EVP_DigestInit_ex. * ext/openssl/openssl_missing.c (EVP_CIPHER_CTX_copy): new function. * ext/openssl/openssl_missing.h (EVP_DigestInit_ex, EVP_DigestFinal_ex, EVP_CipherInit_ex, EVP_CipherFinal_ex, HMAC_Init_ex): new macro for OpenSSL 0.9.6. * ext/openssl/ossl_cipher.c (ossl_cipher_alloc, ossl_cipher_initialize, ossl_cipher_copy, ossl_cipher_reset, ossl_cipher_encrypt, ossl_cipher_decrypt, ossl_cipher_final, ossl_cipher_set_key, ossl_cipher_set_iv): replace all EVP_CipherInit and EVP_CipherFinal into EVP_CipherInit_ex and EVP_CipherFinal_ex. and EVP_CIPHER_CTX_init should only be called once. * ext/openssl/ossl_cipher.c (ossl_cipher_set_padding): check for EVP_CIPHER_CTX_set_padding. * ext/openssl/ossl_cipher.c (Init_ossl_cipher): Cipher#<< is deprecated. * ext/openssl/ossl_digest.c: replace all EVP_DigestInit and EVP_DigestFinal into EVP_DigestInit_ex and EVP_DigestFinal_ex. and EVP_MD_CTX_init should only be called once. * ext/openssl/ossl_digest.c (digest_final): should call EVP_MD_CTX_cleanup to avoid memory leak. * ext/openssl/ossl_hmac.c (ossl_hmac_initialize): repalce HMAC_init into HMAC_init_ex. and HMAC_CTX_init is moved to ossl_hmac_alloc. * ext/openssl/ossl_hmac.c (hmac_final): should call HMAC_CTX_cleanup to avoid memory leak. * test/openssl/test_cipher.rb, test/openssl/test_digest.rb, test/openssl/test_hmac.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* OpenSSL updatemichal2003-09-121-47/+83
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl: imported.gotoyuzo2003-07-231-0/+279
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e