Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.0 fails to build with LibreSSL #4338

Closed
Sp1l opened this issue Aug 20, 2016 · 1 comment
Closed

Version 4.0 fails to build with LibreSSL #4338

Sp1l opened this issue Aug 20, 2016 · 1 comment

Comments

@Sp1l
Copy link

Sp1l commented Aug 20, 2016

When building PowerDNS with LibreSSL as provider for libcrypto/libssl

This is due to LibreSSL defining OPENSSL_VERSION_NUMBER as 0x20000000L.

This is now fixed for @HardenedBSD with HardenedBSD/hardenedbsd-ports@e477f2b

opensslsigners.cc:229:3: error: use of undeclared identifier 'RSA_get0_key'
  RSA_get0_key(d_key, &n, &e, &d);
  ^
opensslsigners.cc:230:3: error: use of undeclared identifier 'RSA_get0_factors'
  RSA_get0_factors(d_key, &p, &q);
  ^
opensslsigners.cc:231:3: error: use of undeclared identifier 'RSA_get0_crt_params'
  RSA_get0_crt_params(d_key, &dmp1, &dmq1, &iqmp);
  ^
opensslsigners.cc:698:3: error: use of undeclared identifier 'ECDSA_SIG_get0'
  ECDSA_SIG_get0(signature, &pr, &ps);
  ^
opensslsigners.cc:743:3: error: use of undeclared identifier 'ECDSA_SIG_set0'
  ECDSA_SIG_set0(sig, r, s);
  ^
11 errors generated.

Patching is simple enough

--- pdns/opensslsigners.cc.orig 2016-07-29 14:32:32 UTC
+++ pdns/opensslsigners.cc
@@ -12,7 +12,7 @@
 #include "opensslsigners.hh"
 #include "dnssecinfra.hh"

-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
+#if OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER)
 /* OpenSSL < 1.1.0 needs support for threading/locking in the calling application. */
 static pthread_mutex_t *openssllocks;
@Sp1l
Copy link
Author

Sp1l commented Aug 20, 2016

Should've checked first... 115f658 fixes the issue.

The changes to dns_random.cc don't seem to be neccessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant