2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

add more LIBRESSL_VERSION_NUMBER checks

This commit is contained in:
Mark Andrews
2016-11-01 12:24:22 +11:00
parent f53fc4540a
commit 3d38cfaf8a
6 changed files with 6 additions and 8 deletions

View File

@@ -279,7 +279,7 @@ dst__openssl_init(const char *engine) {
void void
dst__openssl_destroy(void) { dst__openssl_destroy(void) {
#if OPENSSL_VERSION_NUMBER >= 0x10100000L #if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000L)
OPENSSL_cleanup(); OPENSSL_cleanup();
if (rm != NULL) { if (rm != NULL) {
mem_free(rm FILELINE); mem_free(rm FILELINE);

View File

@@ -216,8 +216,7 @@ openssldh_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
#if OPENSSL_VERSION_NUMBER > 0x00908000L #if OPENSSL_VERSION_NUMBER > 0x00908000L
static int static int
progress_cb(int p, int n, BN_GENCB *cb) progress_cb(int p, int n, BN_GENCB *cb) {
{
union { union {
void *dptr; void *dptr;
void (*fptr)(int); void (*fptr)(int);

View File

@@ -414,8 +414,7 @@ openssldsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
#if OPENSSL_VERSION_NUMBER > 0x00908000L #if OPENSSL_VERSION_NUMBER > 0x00908000L
static int static int
progress_cb(int p, int n, BN_GENCB *cb) progress_cb(int p, int n, BN_GENCB *cb) {
{
union { union {
void *dptr; void *dptr;
void (*fptr)(int); void (*fptr)(int);

View File

@@ -41,7 +41,7 @@
#define DST_RET(a) {ret = a; goto err;} #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 */ /* From OpenSSL 1.1 */
static void static void
ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) { ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) {

View File

@@ -28,7 +28,7 @@
#include <openssl/rsa.h> #include <openssl/rsa.h>
#include <openssl/engine.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_new() &(ctx->_ctx), EVP_MD_CTX_init(&(ctx->_ctx))
#define EVP_MD_CTX_free(ptr) EVP_MD_CTX_cleanup(ptr) #define EVP_MD_CTX_free(ptr) EVP_MD_CTX_cleanup(ptr)
#endif #endif

View File

@@ -121,7 +121,7 @@
#endif #endif
#define DST_RET(a) {ret = a; goto err;} #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 */ /* From OpenSSL 1.1.0 */
static int static int
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) { RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) {