| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Merge https://github.com/rubygems/rubygems/pull/1611
|
|
|
|
|
|
| |
The current CA certificate is created with basicConstraints=CA:FALSE but
it is no longer allowed in OpenSSL 1.1.0. So recreate the CA (and server
certificate).
|
|
|
|
|
|
|
|
|
|
|
| |
The default session timeout for TLSv1 is 7200 and shouldn't be 300. And
this should not be checked because the value is decided by just "the 24
hours mentioned in the TLSv1 spec is way too long for http, the cache
would over fill" (from OpenSSL's source comment).
Old OpenSSL (<= 1.0.2) set ssl_ctx->session_timeout on SSL_CTX_new(),
which we call always with SSLv23_method(), and it isn't updated with
SSL_set_ssl_method().
|
|
|
|
|
| |
SSL_CTX_remove_session() sets not_resumable to the deleted session and
OpenSSL 1.1.0 denies to resume a SSL_SESSION with not_resumable != 0.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
A temporary workaround.
EVP_CipherInit_ex() allows to specify NULL to key and/or iv, however
when we use ChaCha20-Poly1305 and set only key (this case), it does
memcpy(x, NULL, y) and this causes a segmentation fault.
|
|
|
|
|
| |
Add note to the documentation, and fix tests which rely on
Engine.cleanup. Test cases are now run in separate process.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
OpenSSL 1.1.0 introduced "security level" and these methods deal with
it.
This patch includes many test changes: setting the level to 0.
The default security level is 1 and this prohibits aNULL ciphers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use EVP_PKEY_get0_* instead of pkey->pkey.*
Use EVP_PKEY_base_id(pkey) instead of EVP_PKEY_type(pkey->type)
Because of this, we can no longer set the parameters/keys directly, and
the newly added functions as alternative require setting all relevant
values at the same time. So this patch contains incompatibility: the
following code no longer works (if using 1.1.0):
dh = OpenSSL::PKey::DH.new(...)
dh.priv_key = OpenSSL::BN.new(...)
...and we have to write like:
dh = OpenSSL::PKey::DH.new(...)
priv = OpenSSL::BN.new(...)
pub = <calculate (dh.g ** priv) % dh.p>
dh.set_key(pub, priv)
|
| |
|
|
|
|
|
|
| |
Replace direct struct access with getter functions.
squash! ext/openssl: X509* are made opaque
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
HMAC_CTX is made opaque in OpenSSL 1.1.0
|
|
|
|
| |
EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0
|
|
|
|
| |
These functions are made no-op.
|
|
|
|
|
|
|
|
| |
SSL_state() is removed, and the replacement, SSL_get_state(), never
returns SSL_ST_ACCEPT. I think it is used to distinguish if the SSL is a
server or not, so replacing it with SSL_is_server().
And add some `const`s.
|
|
|
|
|
| |
They emit warnings with OpenSSL 1.1.0. Instead use
SSL_CTX_set_{min,max}_proto_version().
|
| |
|
| |
|
|
|
|
|
| |
BN_generate_prime(), BN_is_prime(), BN_is_prime_fasttest() is deprecated
and the replacements are available on all versions of OpenSSL >= 0.9.8.
|
|
|
|
| |
asn1_mac.h is removed in OpenSSL 1.1.0
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
They have existed since ext/openssl was imported to Ruby, but since
openssl_missing.h and ossl.h are not library code, we can remove these
extern "C"s.
|
|
|
|
|
| |
Since openssl/opensslconf.h is always included, we can check
OPENSSL_FIPS macro directly.
|
|
|
|
|
| |
Rename our SSL_SESSION_cmp() to ossl_SSL_SESSION_cmp().
Implement CRYPTO_memcmp() in openssl_missing.c if it is not provided.
|
|
|
|
|
|
|
|
|
|
|
| |
The following code causes SEGV:
OpenSSL::X509::Attribute.new("challengePassword", nil)
* ext/openssl/ossl_x509attr.c (ossl_x509attr_set_value): check that the
argument is an instance of OpenSSL::ASN1::Data, before
ossl_asn1_get_asn1type().
* test/openssl/test_x509attr.rb: add tests
|
|
|
|
|
| |
X509_STORE_get_ex_new_index() is required in addition to
X509_STORE_CTX_get_ex_new_index() because they are independent.
|
|
|
|
|
|
|
|
|
|
| |
Fix build with early versions of OpenSSL 0.9.8.
SSL_CTX_clear_options() was introduced in OpenSSL 0.9.8m, but
unfortunately some Linux distributions still use 0.9.8e.
* ext/openssl/extconf.rb: check existence of SSL_CTX_clear_options().
* ext/openssl/openssl_missing.h: implement the macro.
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* lib/mkmf.rb (pkg_config): use xsystem consistently to set up
library path environment variable as well as latter pkg-config
calls. [ruby-dev:49619] [Bug #12379]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* test/ruby/test_rand.rb: tests for Random.raw_seed and
Random.new_seed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* random.c (make_seed_value): append leading-zero-guard and get
rid of making a local copy of the seed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* random.c (fill_random_seed): move the seed size to an argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* random.c (random_seed): clear temporary buffer explicitly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* NEWS: drop FreeBSD < 4 support.
The most recent version affected by this is 3.5 and was released
in 2000.
https://www.freebsd.org/releases/3.5R/announce.html
https://en.wikipedia.org/wiki/History_of_FreeBSD#Version_history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* ext/extmk.rb: show extension failures in compilation-mode
friendly format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* include/ruby/defines.h (GCC_VERSION_SINCE): get rid of
re-definition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|