From: Remi Gacogne Date: Mon, 17 Oct 2016 08:07:26 +0000 (+0200) Subject: Fix building with ECDSA support disabled in libcrypto X-Git-Tag: dnsdist-1.1.0-beta2~60^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa74d164ae29269168d048d2cc8d7e1f984774c4;p=pdns Fix building with ECDSA support disabled in libcrypto --- diff --git a/m4/pdns_check_libcrypto_ecdsa.m4 b/m4/pdns_check_libcrypto_ecdsa.m4 index 88aa3530d..7c2c48ad6 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 9e919a0f5..acf8f08a6 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() {}