From 4846facb5f35ff04bd48eadbef0b366e4ffb6234 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Tue, 26 Apr 2016 23:42:20 +0900 Subject: ext/openssl: EVP_PKEY, DH, DSA, RSA, EC_KEY are made opaque 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 = dh.set_key(pub, priv) --- ext/openssl/extconf.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/openssl/extconf.rb') diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index df826feae1..8a83cf58db 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -81,6 +81,7 @@ have_func("SSL_CTX_clear_options", ["openssl/ssl.h"]) # added in 1.0.0 have_func("EVP_CIPHER_CTX_copy") +have_func("EVP_PKEY_base_id") have_func("HMAC_CTX_copy") have_func("PKCS5_PBKDF2_HMAC") have_func("X509_NAME_hash_old") -- cgit v1.2.3