Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2017 10:41:46 +0000 (UTC)
From:      Bernard Spil <brnrd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r434923 - head/dns/yadifa/files
Message-ID:  <201702271041.v1RAfkCt018816@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brnrd
Date: Mon Feb 27 10:41:46 2017
New Revision: 434923
URL: https://svnweb.freebsd.org/changeset/ports/434923

Log:
  dns/yadifa: Fix LibreSSL build issues
  
   - Add checks for LIBRESSL_VERSION_NUMBER
  
  PR:		217349
  Obtained from:	https://github.com/yadifa/yadifa/pull/2

Added:
  head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__dsa.c   (contents, props changed)
  head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__ecdsa.c   (contents, props changed)
  head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__rsa.c   (contents, props changed)
  head/dns/yadifa/files/patch-lib_dnscore_src_tsig.c   (contents, props changed)

Added: head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__dsa.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__dsa.c	Mon Feb 27 10:41:46 2017	(r434923)
@@ -0,0 +1,20 @@
+--- lib/dnscore/src/dnskey_dsa.c.orig	2016-12-16 11:52:17 UTC
++++ lib/dnscore/src/dnskey_dsa.c
+@@ -70,7 +70,7 @@
+ #error "OPENSSL_VERSION_NUMBER not defined"
+ #endif
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ /*
+  * Backward-compatible interface for 0.9.x
+@@ -226,7 +226,7 @@ dnskey_dsa_genkey(u32 size)
+     int err;
+     DSA* dsa;
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+     dsa = DSA_generate_parameters(size, NULL,0, NULL, NULL, NULL, NULL);
+ #else
+     dsa = DSA_new();

Added: head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__ecdsa.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__ecdsa.c	Mon Feb 27 10:41:46 2017	(r434923)
@@ -0,0 +1,11 @@
+--- lib/dnscore/src/dnskey_ecdsa.c.orig	2016-12-16 11:52:17 UTC
++++ lib/dnscore/src/dnskey_ecdsa.c
+@@ -79,7 +79,7 @@
+ #define DNSKEY_ALGORITHM_ECDSAP256SHA256_NID NID_X9_62_prime256v1
+ #define DNSKEY_ALGORITHM_ECDSAP384SHA384_NID NID_secp384r1
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #define SSL_FIELD_GET(st_,f_) if(f_ != NULL) { *f_ = st_->f_; }
+ #define SSL_FIELD_SET(st_,f_) if(f_ != NULL) { BN_free(st_->f_); st_->f_ = f_; }

Added: head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__rsa.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/yadifa/files/patch-lib_dnscore_src_dnskey__rsa.c	Mon Feb 27 10:41:46 2017	(r434923)
@@ -0,0 +1,11 @@
+--- lib/dnscore/src/dnskey_rsa.c.orig	2016-12-16 11:52:17 UTC
++++ lib/dnscore/src/dnskey_rsa.c
+@@ -64,7 +64,7 @@
+ 
+ #define MODULE_MSG_HANDLE g_system_logger
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #define SSL_FIELD_GET(st_,f_) if(f_ != NULL) { *f_ = st_->f_; }
+ #define SSL_FIELD_SET(st_,f_) if(f_ != NULL) { BN_free(st_->f_); st_->f_ = f_; }

Added: head/dns/yadifa/files/patch-lib_dnscore_src_tsig.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/yadifa/files/patch-lib_dnscore_src_tsig.c	Mon Feb 27 10:41:46 2017	(r434923)
@@ -0,0 +1,29 @@
+--- lib/dnscore/src/tsig.c.orig	2016-12-16 11:52:17 UTC
++++ lib/dnscore/src/tsig.c
+@@ -233,7 +233,7 @@
+ tsig_hmac_t
+ tsig_hmac_allocate()
+ {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // ie: 0.9.x
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) // ie: 0.9.x
+     HMAC_CTX *hmac;
+     ZALLOC_OR_DIE(HMAC_CTX*, hmac, HMAC_CTX, GENERIC_TAG);
+     HMAC_CTX_init(hmac);
+@@ -257,7 +257,7 @@ tsig_hmac_free(tsig_hmac_t t)
+ {
+     HMAC_CTX *hmac = (HMAC_CTX*)t;
+     yassert(hmac != NULL);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+     HMAC_CTX_cleanup(hmac);
+     ZFREE(t, HMAC_CTX);
+ #else
+@@ -268,7 +268,7 @@ tsig_hmac_free(tsig_hmac_t t)
+ void tsig_hmac_reset(tsig_hmac_t t)
+ {
+     HMAC_CTX *hmac = (HMAC_CTX*)t;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+     HMAC_CTX_cleanup(hmac);
+     HMAC_CTX_init(hmac);
+ #else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702271041.v1RAfkCt018816>