From aa74d164ae29269168d048d2cc8d7e1f984774c4 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 17 Oct 2016 10:07:26 +0200 Subject: [PATCH] Fix building with ECDSA support disabled in libcrypto --- m4/pdns_check_libcrypto_ecdsa.m4 | 2 +- pdns/opensslsigners.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/m4/pdns_check_libcrypto_ecdsa.m4 b/m4/pdns_check_libcrypto_ecdsa.m4 index 88aa3530d8..7c2c48ad67 100644 --- a/m4/pdns_check_libcrypto_ecdsa.m4 +++ b/m4/pdns_check_libcrypto_ecdsa.m4 @@ -12,6 +12,6 @@ AC_DEFUN([PDNS_CHECK_LIBCRYPTO_ECDSA], [ ]) AS_IF([test "x$libcrypto_ecdsa" = "xyes"], [ - AC_DEFINE([HAVE_LIBCRYPTO_ECDSA], [1], [define to 1 if OpenSSL ecdsa support is avalable.]) + AC_DEFINE([HAVE_LIBCRYPTO_ECDSA], [1], [define to 1 if OpenSSL ecdsa support is available.]) ]) ]) diff --git a/pdns/opensslsigners.cc b/pdns/opensslsigners.cc index 9e919a0f53..acf8f08a67 100644 --- a/pdns/opensslsigners.cc +++ b/pdns/opensslsigners.cc @@ -128,6 +128,7 @@ static inline int RSA_set0_crt_params(RSA* rsakey, BIGNUM* dmp1, BIGNUM* dmq1, B return 1; } +#ifdef HAVE_LIBCRYPTO_ECDSA static inline void ECDSA_SIG_get0(const ECDSA_SIG* signature, const BIGNUM** pr, const BIGNUM** ps) { *pr = signature->r; *ps = signature->s; @@ -140,6 +141,8 @@ static inline int ECDSA_SIG_set0(ECDSA_SIG* signature, BIGNUM* pr, BIGNUM* ps) { signature->s = ps; return 1; } +#endif /* HAVE_LIBCRYPTO_ECDSA */ + #else void openssl_thread_setup() {} void openssl_thread_cleanup() {} -- 2.47.2