diff options
Diffstat (limited to 'ext/openssl/ossl.h')
-rw-r--r-- | ext/openssl/ossl.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 4b5126893b..68d42b71e2 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -43,19 +43,29 @@ #ifndef LIBRESSL_VERSION_NUMBER # define OSSL_IS_LIBRESSL 0 # define OSSL_OPENSSL_PREREQ(maj, min, pat) \ - (OPENSSL_VERSION_NUMBER >= (maj << 28) | (min << 20) | (pat << 12)) + (OPENSSL_VERSION_NUMBER >= ((maj << 28) | (min << 20) | (pat << 12))) # define OSSL_LIBRESSL_PREREQ(maj, min, pat) 0 #else # define OSSL_IS_LIBRESSL 1 # define OSSL_OPENSSL_PREREQ(maj, min, pat) 0 # define OSSL_LIBRESSL_PREREQ(maj, min, pat) \ - (LIBRESSL_VERSION_NUMBER >= (maj << 28) | (min << 20) | (pat << 12)) + (LIBRESSL_VERSION_NUMBER >= ((maj << 28) | (min << 20) | (pat << 12))) +#endif + +#if OSSL_OPENSSL_PREREQ(3, 0, 0) +# define OSSL_3_const const +#else +# define OSSL_3_const /* const */ #endif #if !defined(OPENSSL_NO_ENGINE) && !OSSL_OPENSSL_PREREQ(3, 0, 0) # define OSSL_USE_ENGINE #endif +#if OSSL_OPENSSL_PREREQ(3, 0, 0) +# define OSSL_USE_PROVIDER +#endif + /* * Common Module */ @@ -151,7 +161,6 @@ VALUE ossl_to_der_if_possible(VALUE); */ extern VALUE dOSSL; -#if defined(HAVE_VA_ARGS_MACRO) #define OSSL_Debug(...) do { \ if (dOSSL == Qtrue) { \ fprintf(stderr, "OSSL_DEBUG: "); \ @@ -160,11 +169,6 @@ extern VALUE dOSSL; } \ } while (0) -#else -void ossl_debug(const char *, ...); -#define OSSL_Debug ossl_debug -#endif - /* * Include all parts */ @@ -188,6 +192,7 @@ void ossl_debug(const char *, ...); #endif #include "ossl_x509.h" #include "ossl_engine.h" +#include "ossl_provider.h" #include "ossl_kdf.h" void Init_openssl(void); |