diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index 0fbf60df4..28e4fc360 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h @@ -21,6 +21,7 @@ #ifdef WITH_OPENSSL #include +#include #include #include #include @@ -33,12 +34,18 @@ int ssh_compatible_openssl(long, long); # error OpenSSL 0.9.8f or greater is required #endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L -# define OpenSSL_version_num SSLeay -# define OpenSSL_version SSLeay_version +#ifndef OPENSSL_VERSION # define OPENSSL_VERSION SSLEAY_VERSION #endif +#ifndef HAVE_OPENSSL_VERSION +# define OpenSSL_version(x) SSLeay_version(x) +#endif + +#ifndef HAVE_OPENSSL_VERSION_NUM +# define OpenSSL_version_num SSLeay +#endif + #if OPENSSL_VERSION_NUMBER < 0x10000001L # define LIBCRYPTO_EVP_INL_TYPE unsigned int #else