Permalink
Browse files

Fix building with ECDSA support disabled in libcrypto

(cherry picked from commit aa74d16)
  • Loading branch information...
1 parent eb2684f commit 3d59c6f7d83f54d5c73013de5ab61e9a0ecd1460 @rgacogne rgacogne committed Oct 17, 2016
Showing with 4 additions and 1 deletion.
  1. +1 −1 m4/pdns_check_libcrypto_ecdsa.m4
  2. +3 −0 pdns/opensslsigners.cc
@@ -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.])
])
])
@@ -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() {}

0 comments on commit 3d59c6f

Please sign in to comment.