diff options
Diffstat (limited to 'openssl-compat.h')
-rw-r--r-- | openssl-compat.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/openssl-compat.h b/openssl-compat.h index 69afc716e25e..a23e34251b90 100644 --- a/openssl-compat.h +++ b/openssl-compat.h @@ -1,7 +1,11 @@ #ifndef OPENSSL_COMPAT_H #define OPENSSL_COMPAT_H -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#include <openssl/bio.h> +#include "util-internal.h" + +#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) static inline BIO_METHOD *BIO_meth_new(int type, const char *name) { @@ -30,6 +34,14 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name) #define TLS_method SSLv23_method -#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ +#define X509_getm_notBefore X509_get_notBefore +#define X509_getm_notAfter X509_get_notAfter + +#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */ + +#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L +#define BIO_get_init(b) (b)->init +#endif #endif /* OPENSSL_COMPAT_H */ |