#define TOR_COMPAT_OPENSSL_H
#include <openssl/opensslv.h>
-// workaround for libressl; not needed in later Tor versions.
-#include <openssl/crypto.h>
+#include "crypto_openssl_mgt.h"
+
/**
* \file compat_openssl.h
*
/* We define this macro if we're trying to build with the majorly refactored
* API in OpenSSL 1.1 */
#define OPENSSL_1_1_API
-#endif
+#endif /* OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) && ... */
- #ifndef OPENSSL_1_1_API
+ #ifndef OPENSSL_VERSION
#define OPENSSL_VERSION SSLEAY_VERSION
+ #endif
+
+ #ifndef OPENSSL_1_1_API
#define OpenSSL_version(v) SSLeay_version(v)
#define OpenSSL_version_num() SSLeay()
#define RAND_OpenSSL() RAND_SSLeay()