From owner-svn-ports-head@freebsd.org Mon Sep 12 02:20:53 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56AB2BD7B47; Mon, 12 Sep 2016 02:20:53 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1919A2A1; Mon, 12 Sep 2016 02:20:53 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8C2KqJo094600; Mon, 12 Sep 2016 02:20:52 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8C2Kq95094597; Mon, 12 Sep 2016 02:20:52 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201609120220.u8C2Kq95094597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Mon, 12 Sep 2016 02:20:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r421896 - in head/net-mgmt/snmp++: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2016 02:20:53 -0000 Author: marino Date: Mon Sep 12 02:20:51 2016 New Revision: 421896 URL: https://svnweb.freebsd.org/changeset/ports/421896 Log: net-mgmt/snmp++: Document SSL build requirement, patch for LibreSSL This allows for ports SSL libraries to be used for the build, including LibreSSL ports. Approved by: SSL blanket Added: head/net-mgmt/snmp++/files/patch-auth__priv.cpp (contents, props changed) Modified: head/net-mgmt/snmp++/Makefile head/net-mgmt/snmp++/files/Makefile.FreeBSD Modified: head/net-mgmt/snmp++/Makefile ============================================================================== --- head/net-mgmt/snmp++/Makefile Mon Sep 12 02:07:16 2016 (r421895) +++ head/net-mgmt/snmp++/Makefile Mon Sep 12 02:20:51 2016 (r421896) @@ -13,9 +13,9 @@ COMMENT= SNMP C++ library with V3 suppor MAKEFILE= Makefile.FreeBSD WRKSRC= ${WRKDIR}/${PORTNAME}/src -USES= gmake +USES= gmake ssl:build USE_LDCONFIG= yes -MAKE_ARGS= CC="${CXX}" +MAKE_ARGS= CC="${CXX}" PORTOPTS="-I${OPENSSLINC} -L${OPENSSLLIB}" post-extract: ${CP} ${FILESDIR}/Makefile.FreeBSD ${WRKSRC} Modified: head/net-mgmt/snmp++/files/Makefile.FreeBSD ============================================================================== --- head/net-mgmt/snmp++/files/Makefile.FreeBSD Mon Sep 12 02:07:16 2016 (r421895) +++ head/net-mgmt/snmp++/files/Makefile.FreeBSD Mon Sep 12 02:20:51 2016 (r421896) @@ -35,7 +35,7 @@ COPTIONS = -D_XPG4_EXTENDED -D__unix -Wa TEMPOPTS = -I. USEROPTS = -g -CFLAGS = $(COPTIONS) $(CINCDIRS) $(USEROPTS) +CFLAGS = $(COPTIONS) $(CINCDIRS) $(USEROPTS) $(PORTOPTS) LDFLAGS = $(CFLAGS) SHARED = -fPIC -shared Added: head/net-mgmt/snmp++/files/patch-auth__priv.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/snmp++/files/patch-auth__priv.cpp Mon Sep 12 02:20:51 2016 (r421896) @@ -0,0 +1,125 @@ +--- auth_priv.cpp.orig 2016-04-15 19:57:59 UTC ++++ auth_priv.cpp +@@ -89,34 +89,34 @@ typedef MD5_CTX MD5HashSta + #define MD5_PROCESS(s, p, l) MD5_Update(s, p, l) + #define MD5_DONE(s, k) MD5_Final(k, s) + +-typedef des_key_schedule DESCBCType; ++typedef DES_key_schedule DESCBCType; + #define DES_CBC_START_ENCRYPT(c, iv, k, kl, r, s) \ +- if (des_key_sched((C_Block*)(k), s) < 0) \ ++ if (DES_key_sched((DES_cblock*)(k), &s) < 0) \ + { \ + debugprintf(0, "Starting DES encryption failed."); \ + return SNMPv3_USM_ERROR; \ + } + #define DES_CBC_START_DECRYPT(c, iv, k, kl, r, s) \ +- if (des_key_sched((C_Block*)(k), s) < 0) \ ++ if (DES_key_sched((DES_cblock*)(k), &s) < 0) \ + { \ + debugprintf(0, "Starting DES decryption failed."); \ + return SNMPv3_USM_ERROR; \ + } + + #define DES_CBC_ENCRYPT(pt, ct, s, iv, l) \ +- des_ncbc_encrypt(pt, ct, l, \ +- s, (C_Block*)(iv), DES_ENCRYPT) ++ DES_ncbc_encrypt(pt, ct, l, \ ++ &s, (DES_cblock*)(iv), DES_ENCRYPT) + #define DES_CBC_DECRYPT(ct, pt, s, iv, l) \ +- des_ncbc_encrypt(ct, pt, l, \ +- s, (C_Block*)(iv), DES_DECRYPT) ++ DES_ncbc_encrypt(ct, pt, l, \ ++ &s, (DES_cblock*)(iv), DES_DECRYPT) + + #define DES_EDE3_CBC_ENCRYPT(pt, ct, l, k1, k2, k3, iv) \ +- des_ede3_cbc_encrypt(pt, ct, l, \ +- k1, k2, k3, (C_Block*)(iv), DES_ENCRYPT) ++ DES_ede3_cbc_encrypt(pt, ct, l, \ ++ k1, k2, k3, (DES_cblock*)(iv), DES_ENCRYPT) + + #define DES_EDE3_CBC_DECRYPT(ct, pt, l, k1, k2, k3, iv) \ +- des_ede3_cbc_encrypt(ct, pt, l, \ +- k1, k2, k3, (C_Block*)(iv), DES_DECRYPT) ++ DES_ede3_cbc_encrypt(ct, pt, l, \ ++ k1, k2, k3, (DES_cblock*)(iv), DES_DECRYPT) + + #define DES_MEMSET(s, c, l) memset(&(s), c, l) + +@@ -182,12 +182,12 @@ typedef MD5_CTX MD5HashSta + #define MD5_DONE(s, k) MD5Final(k, s) + + #define DES_EDE3_CBC_ENCRYPT(pt, ct, l, k1, k2, k3, iv) \ +- des_ede3_cbc_encrypt((C_Block*)(pt), (C_Block*)(ct), l, \ +- k1, k2, k3, (C_Block*)(iv), DES_ENCRYPT) ++ DES_ede3_cbc_encrypt((DES_cblock*)(pt), (DES_cblock*)(ct), l, \ ++ k1, k2, k3, (DES_cblock*)(iv), DES_ENCRYPT) + + #define DES_EDE3_CBC_DECRYPT(ct, pt, l, k1, k2, k3, iv) \ +- des_ede3_cbc_encrypt((C_Block*)(ct), (C_Block*)(pt), l, \ +- k1, k2, k3, (C_Block*)(iv), DES_DECRYPT) ++ DES_ede3_cbc_encrypt((DES_cblock*)(ct), (DES_cblock*)(pt), l, \ ++ k1, k2, k3, (DES_cblock*)(iv), DES_DECRYPT) + + #ifdef RSAEURO + +@@ -205,26 +205,26 @@ typedef DES_CBC_CTX DESCBCType + + #else // RSAEURO + +-typedef des_key_schedule DESCBCType; ++typedef DES_key_schedule DESCBCType; + #define DES_CBC_START_ENCRYPT(c, iv, k, kl, r, s) \ +- if (des_key_sched((C_Block*)(k), s) < 0) \ ++ if (DES_key_sched((DES_cblock*)(k), &s) < 0) \ + { \ + debugprintf(0, "Starting DES encryption failed."); \ + return SNMPv3_USM_ERROR; \ + } + #define DES_CBC_START_DECRYPT(c, iv, k, kl, r, s) \ +- if (des_key_sched((C_Block*)(k), s) < 0) \ ++ if (DES_key_sched((DES_cblock*)(k), &s) < 0) \ + { \ + debugprintf(0, "Starting DES decryption failed."); \ + return SNMPv3_USM_ERROR; \ + } + + #define DES_CBC_ENCRYPT(pt, ct, s, iv, l) \ +- des_ncbc_encrypt((C_Block*)(pt), (C_Block*)(ct), l, \ +- s, (C_Block*)(iv), DES_ENCRYPT) ++ DES_ncbc_encrypt((DES_cblock*)(pt), (DES_cblock*)(ct), l, \ ++ &s, (DES_cblock*)(iv), DES_ENCRYPT) + #define DES_CBC_DECRYPT(ct, pt, s, iv, l) \ +- des_ncbc_encrypt((C_Block*)(ct), (C_Block*)(pt), l, \ +- s, (C_Block*)(iv), DES_DECRYPT) ++ DES_ncbc_encrypt((DES_cblock*)(ct), (DES_cblock*)(pt), l, \ ++ &s, (DES_cblock*)(iv), DES_DECRYPT) + #define DES_MEMSET(s, c, l) memset(&(s), c, l) + + /* -- END: Defines for libdes -- */ +@@ -1939,9 +1939,9 @@ Priv3DES_EDE::encrypt(const unsigned cha + #else + DESCBCType ks1, ks2, ks3; + +- if ((des_key_sched((C_Block*)(key), ks1) < 0) || +- (des_key_sched((C_Block*)(key +8), ks2) < 0) || +- (des_key_sched((C_Block*)(key +16), ks3) < 0)) ++ if ((DES_key_sched((DES_cblock*)(key), &ks1) < 0) || ++ (DES_key_sched((DES_cblock*)(key +8), &ks2) < 0) || ++ (DES_key_sched((DES_cblock*)(key +16), &ks3) < 0)) + { + debugprintf(0, "Starting 3DES-EDE encryption failed."); + return SNMPv3_USM_ERROR; +@@ -2028,9 +2028,9 @@ Priv3DES_EDE::decrypt(const unsigned cha + #else + DESCBCType ks1, ks2, ks3; + +- if ((des_key_sched((C_Block*)(key), ks1) < 0) || +- (des_key_sched((C_Block*)(key+8), ks2) < 0) || +- (des_key_sched((C_Block*)(key+16), ks3) < 0)) ++ if ((DES_key_sched((C_Block*)(key), &ks1) < 0) || ++ (DES_key_sched((C_Block*)(key+8), &ks2) < 0) || ++ (DES_key_sched((C_Block*)(key+16), &ks3) < 0)) + { + debugprintf(0, "Starting 3DES-EDE decryption failed."); + return SNMPv3_USM_ERROR;