svn commit: r421896 - in head/net-mgmt/snmp++: . files
John Marino
marino at FreeBSD.org
Mon Sep 12 02:20:53 UTC 2016
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;
More information about the svn-ports-head
mailing list