aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-05-30 22:00:32 -0700
committerJeremy Evans <code@jeremyevans.net>2019-05-30 22:03:06 -0700
commite6a027d2e6fb6aa261226b526cdc4e159697af2b (patch)
treee59a1645bf18615b4f51b623b3eaba6792007c20 /ext
parent057691e2bd3a2af4654d793bad78db3b991c9e19 (diff)
downloadruby-openssl-e6a027d2e6fb6aa261226b526cdc4e159697af2b.tar.gz
Fix opaque check to work correctly on OpenSSL <1.1
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/openssl_missing.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
index 645e90a0..7ef64780 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -147,8 +147,8 @@ void ossl_X509_REQ_get0_signature(const X509_REQ *, const ASN1_BIT_STRING **, co
CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_EVP_PKEY);
#endif
-#if !defined(HAVE_OPAQUE_OPENSSL)
-#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL
+#if !defined(HAVE_OPAQUE_OPENSSL) && \
+ (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL)
#define IMPL_PKEY_GETTER(_type, _name) \
static inline _type *EVP_PKEY_get0_##_type(EVP_PKEY *pkey) { \
return pkey->pkey._name; }
@@ -200,7 +200,6 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
#undef IMPL_PKEY_GETTER
#undef IMPL_KEY_ACCESSOR2
#undef IMPL_KEY_ACCESSOR3
-#endif
#endif /* HAVE_OPAQUE_OPENSSL */
#if !defined(EVP_CTRL_AEAD_GET_TAG)