Commit 3d38cfaf authored by Mark Andrews's avatar Mark Andrews

add more LIBRESSL_VERSION_NUMBER checks

parent f53fc454
......@@ -279,7 +279,7 @@ dst__openssl_init(const char *engine) {
void
dst__openssl_destroy(void) {
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000L)
OPENSSL_cleanup();
if (rm != NULL) {
mem_free(rm FILELINE);
......
......@@ -216,8 +216,7 @@ openssldh_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
#if OPENSSL_VERSION_NUMBER > 0x00908000L
static int
progress_cb(int p, int n, BN_GENCB *cb)
{
progress_cb(int p, int n, BN_GENCB *cb) {
union {
void *dptr;
void (*fptr)(int);
......
......@@ -414,8 +414,7 @@ openssldsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
#if OPENSSL_VERSION_NUMBER > 0x00908000L
static int
progress_cb(int p, int n, BN_GENCB *cb)
{
progress_cb(int p, int n, BN_GENCB *cb) {
union {
void *dptr;
void (*fptr)(int);
......
......@@ -41,7 +41,7 @@
#define DST_RET(a) {ret = a; goto err;}
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
/* From OpenSSL 1.1 */
static void
ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) {
......
......@@ -28,7 +28,7 @@
#include <openssl/rsa.h>
#include <openssl/engine.h>
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define EVP_MD_CTX_new() &(ctx->_ctx), EVP_MD_CTX_init(&(ctx->_ctx))
#define EVP_MD_CTX_free(ptr) EVP_MD_CTX_cleanup(ptr)
#endif
......
......@@ -121,7 +121,7 @@
#endif
#define DST_RET(a) {ret = a; goto err;}
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
/* From OpenSSL 1.1.0 */
static int
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment