diff --git a/dns/powerdns-recursor/Makefile b/dns/powerdns-recursor/Makefile index fa938d9f3cb8..068f21266b00 100644 --- a/dns/powerdns-recursor/Makefile +++ b/dns/powerdns-recursor/Makefile @@ -1,66 +1,66 @@ # Created by: sten@blinkenlights.nl PORTNAME= recursor -DISTVERSION= 4.6.0 +DISTVERSION= 4.6.1 CATEGORIES= dns MASTER_SITES= http://downloads.powerdns.com/releases/ PKGNAMEPREFIX= powerdns- DISTNAME= pdns-${PORTNAME}-${DISTVERSION} MAINTAINER= tremere@cainites.net COMMENT= Advanced DNS recursor LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_armv6= fails to compile: use of overloaded operator << is ambiguous BROKEN_armv7= fails to compile: use of overloaded operator << is ambiguous BROKEN_FreeBSD_12_powerpc64= fails to compile: Assembler messages: unaligned opcodes detected in executable segment NOT_FOR_ARCHS= i386 NOT_FOR_ARCHS_REASON= archs with 32-bits time_t are no longer supported by upstream BUILD_DEPENDS= ${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs LIB_DEPENDS= libboost_context.so:devel/boost-libs USES= autoreconf compiler:c++11-lib cpe gmake libtool \ localbase:ldflags pkgconfig ssl tar:bzip2 CPE_VENDOR= powerdns USE_RC_SUBR= pdns-recursor GNU_CONFIGURE= YES CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/pdns \ --without-net-snmp \ --without-systemd \ --with-libsodium=no SUB_FILES= pkg-message USERS= pdns_recursor GROUPS= pdns OPTIONS_DEFINE= DNSTAP OPTIONS_DEFAULT= LUA OPTIONS_SINGLE= EXTLUA OPTIONS_SINGLE_EXTLUA= LUA LUAJIT LUAJITOR DNSTAP_DESC= dnstap support (see dnstap.info) LUAJITOR_DESC= Use lang/luajit-openresty LUAJIT_DESC= Use lang/luajit LUA_DESC= Use lang/lua DNSTAP_LIB_DEPENDS= libfstrm.so:devel/fstrm DNSTAP_CONFIGURE_ENABLE= dnstap LUAJITOR_LIB_DEPENDS= libluajit-5.1.so.2:lang/luajit-openresty LUAJITOR_CONFIGURE_ON= --with-lua=luajit LUAJIT_LIB_DEPENDS= libluajit-5.1.so.2:lang/luajit LUAJIT_CONFIGURE_ON= --with-lua=luajit LUA_USES= lua post-install: @${MKDIR} ${STAGEDIR}/var/run/pdns-recursor .include diff --git a/dns/powerdns-recursor/distinfo b/dns/powerdns-recursor/distinfo index 4103f40bb370..aa8ef2398908 100644 --- a/dns/powerdns-recursor/distinfo +++ b/dns/powerdns-recursor/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1639754437 -SHA256 (pdns-recursor-4.6.0.tar.bz2) = df06559398aebc594d2e1e27d177f981bdbbc17f968d6306a52aa7d1119fbcf2 -SIZE (pdns-recursor-4.6.0.tar.bz2) = 1549434 +TIMESTAMP = 1648224655 +SHA256 (pdns-recursor-4.6.1.tar.bz2) = 7b8500908b84a87ea8a021cbff3f6c1f9ff95f0199e7c972b15b93dfb1561ceb +SIZE (pdns-recursor-4.6.1.tar.bz2) = 1541000 diff --git a/dns/powerdns-recursor/files/patch-credentials.cc b/dns/powerdns-recursor/files/patch-credentials.cc new file mode 100644 index 000000000000..4d71e65ad7aa --- /dev/null +++ b/dns/powerdns-recursor/files/patch-credentials.cc @@ -0,0 +1,101 @@ +--- credentials.cc.orig 2021-11-23 18:39:17 UTC ++++ credentials.cc +@@ -28,7 +28,7 @@ + #include + #endif + +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + #include + #include + #include +@@ -42,7 +42,7 @@ + #include "credentials.hh" + #include "misc.hh" + +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + static size_t const pwhash_max_size = 128U; /* maximum size of the output */ + static size_t const pwhash_output_size = 32U; /* size of the hashed output (before base64 encoding) */ + static unsigned int const pwhash_salt_size = 16U; /* size of the salt (before base64 encoding */ +@@ -95,7 +95,7 @@ void SensitiveData::clear() + + static std::string hashPasswordInternal(const std::string& password, const std::string& salt, uint64_t workFactor, uint64_t parallelFactor, uint64_t blockSize) + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + auto pctx = std::unique_ptr(EVP_PKEY_CTX_new_id(EVP_PKEY_SCRYPT, nullptr), EVP_PKEY_CTX_free); + if (!pctx) { + throw std::runtime_error("Error getting a scrypt context to hash the supplied password"); +@@ -142,7 +142,7 @@ static std::string hashPasswordInternal(const std::str + + static std::string generateRandomSalt() + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + /* generate a random salt */ + std::string salt; + salt.resize(pwhash_salt_size); +@@ -159,7 +159,7 @@ static std::string generateRandomSalt() + + std::string hashPassword(const std::string& password, uint64_t workFactor, uint64_t parallelFactor, uint64_t blockSize) + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + std::string result; + result.reserve(pwhash_max_size); + +@@ -187,7 +187,7 @@ std::string hashPassword(const std::string& password, + + std::string hashPassword(const std::string& password) + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + return hashPassword(password, CredentialsHolder::s_defaultWorkFactor, CredentialsHolder::s_defaultParallelFactor, CredentialsHolder::s_defaultBlockSize); + #else + throw std::runtime_error("Hashing a password requires scrypt support in OpenSSL, and it is not available"); +@@ -196,7 +196,7 @@ std::string hashPassword(const std::string& password) + + bool verifyPassword(const std::string& binaryHash, const std::string& salt, uint64_t workFactor, uint64_t parallelFactor, uint64_t blockSize, const std::string& binaryPassword) + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + auto expected = hashPasswordInternal(binaryPassword, salt, workFactor, parallelFactor, blockSize); + return constantTimeStringEquals(expected, binaryHash); + #else +@@ -207,7 +207,7 @@ bool verifyPassword(const std::string& binaryHash, con + /* parse a hashed password in PHC string format */ + static void parseHashed(const std::string& hash, std::string& salt, std::string& hashedPassword, uint64_t& workFactor, uint64_t& parallelFactor, uint64_t& blockSize) + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + auto parametersEnd = hash.find('$', pwhash_prefix.size()); + if (parametersEnd == std::string::npos || parametersEnd == hash.size()) { + throw std::runtime_error("Invalid hashed password format, no parameters"); +@@ -276,7 +276,7 @@ bool verifyPassword(const std::string& hash, const std + return false; + } + +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + std::string salt; + std::string hashedPassword; + uint64_t workFactor = 0; +@@ -294,7 +294,7 @@ bool verifyPassword(const std::string& hash, const std + + bool isPasswordHashed(const std::string& password) + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + if (password.size() < pwhash_prefix_size || password.size() > pwhash_max_size) { + return false; + } +@@ -389,7 +389,7 @@ bool CredentialsHolder::matches(const std::string& pas + + bool CredentialsHolder::isHashingAvailable() + { +-#ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT ++#if defined(HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT) && defined(EVP_PKEY_SCRYPT) + return true; + #else + return false;