]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add more LIBRESSL_VERSION_NUMBER checks
authorMark Andrews <marka@isc.org>
Tue, 1 Nov 2016 01:24:22 +0000 (12:24 +1100)
committerMark Andrews <marka@isc.org>
Tue, 1 Nov 2016 01:24:22 +0000 (12:24 +1100)
lib/dns/openssl_link.c
lib/dns/openssldh_link.c
lib/dns/openssldsa_link.c
lib/dns/opensslecdsa_link.c
lib/dns/opensslgost_link.c
lib/dns/opensslrsa_link.c

index 0527e7450563c9144b87752a41ed25da622c00fc..c4d30e1e89299e9234f1246b07f4bd73e59be462 100644 (file)
@@ -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);
index c08eeaf50d36839f798385d51830f973dbd00cec..f334230a1cc83d0da1dcc60809f00c67a00fe6b2 100644 (file)
@@ -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);
index 2b55bc46505ca471bc6beea82b06688132299997..ba583dc026fa343020806b3a98c62a651c0e1e9c 100644 (file)
@@ -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);
index 76d5a9dc5b9534c763795fd813b7d808b4e235af..42b929a33ea4863fa07d52f435e3bd89beaf44c2 100644 (file)
@@ -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) {
index 62d7238bb729e236b0a4c2990b484b8d11149d87..1ea60607a81bdb540a44a70014b7370c79198ea1 100644 (file)
@@ -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
index 89b4975c634d5b9c297ea20ec614fa0d2bc08700..b82159df56387f2424683138473c0ed67ce46d5d 100644 (file)
 #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) {