From owner-svn-ports-all@freebsd.org Mon Aug 15 11:02:27 2016 Return-Path: Delivered-To: svn-ports-all@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 DFA85BBA212; Mon, 15 Aug 2016 11:02:27 +0000 (UTC) (envelope-from brnrd@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 BC0FC199B; Mon, 15 Aug 2016 11:02:27 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7FB2QUg007377; Mon, 15 Aug 2016 11:02:26 GMT (envelope-from brnrd@FreeBSD.org) Received: (from brnrd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7FB2Q3U007375; Mon, 15 Aug 2016 11:02:26 GMT (envelope-from brnrd@FreeBSD.org) Message-Id: <201608151102.u7FB2Q3U007375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brnrd set sender to brnrd@FreeBSD.org using -f From: Bernard Spil Date: Mon, 15 Aug 2016 11:02:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420225 - in head/security/dsniff: . 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2016 11:02:28 -0000 Author: brnrd Date: Mon Aug 15 11:02:26 2016 New Revision: 420225 URL: https://svnweb.freebsd.org/changeset/ports/420225 Log: security/dsniff: Replace deprecated des_ methods and structs - Replace all des_ methods and structs with DES_ equivalents - Remove openssl/des_old.h include - Register dependencies on OpenSSL, glib20 and gettext Obtained from: OpenBSD ports Reviewed by: sbz (maintainer) Approved by: sbz (maintainer) Differential Revision: D7054 Modified: head/security/dsniff/Makefile head/security/dsniff/files/patch-sshcrypto.c Modified: head/security/dsniff/Makefile ============================================================================== --- head/security/dsniff/Makefile Mon Aug 15 11:00:27 2016 (r420224) +++ head/security/dsniff/Makefile Mon Aug 15 11:02:26 2016 (r420225) @@ -18,7 +18,8 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libnids. GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-libnet=${LOCALBASE} DESTDIRNAME= install_prefix -USES= pkgconfig +USES= gettext pkgconfig ssl +USE_GNOME= glib20 WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:C/(.*)..$/\1/} OPTIONS_DEFINE= X11 Modified: head/security/dsniff/files/patch-sshcrypto.c ============================================================================== --- head/security/dsniff/files/patch-sshcrypto.c Mon Aug 15 11:00:27 2016 (r420224) +++ head/security/dsniff/files/patch-sshcrypto.c Mon Aug 15 11:02:26 2016 (r420225) @@ -1,12 +1,66 @@ ---- ./sshcrypto.c.orig 2001-03-15 09:33:04.000000000 +0100 -+++ ./sshcrypto.c 2014-07-22 13:20:14.000000000 +0200 -@@ -14,6 +14,9 @@ - +$OpenBSD: patch-sshcrypto_c,v 1.3 2015/05/29 15:57:29 jca Exp $ +--- sshcrypto.c.orig Tue Nov 28 22:23:28 2000 ++++ sshcrypto.c Fri May 29 17:56:22 2015 +@@ -15,7 +15,9 @@ #include #include -+#include -+#include -+#include ++#include #include ++#include #include + #include + +@@ -27,8 +29,8 @@ struct blowfish_state { + }; + + struct des3_state { +- des_key_schedule k1, k2, k3; +- des_cblock iv1, iv2, iv3; ++ DES_key_schedule k1, k2, k3; ++ DES_cblock iv1, iv2, iv3; + }; + + void +@@ -153,13 +155,13 @@ des3_init(u_char *sesskey, int len) + if ((state = malloc(sizeof(*state))) == NULL) + err(1, "malloc"); + +- des_set_key((void *)sesskey, state->k1); +- des_set_key((void *)(sesskey + 8), state->k2); ++ DES_set_key((void *)sesskey, &state->k1); ++ DES_set_key((void *)(sesskey + 8), &state->k2); + + if (len <= 16) +- des_set_key((void *)sesskey, state->k3); ++ DES_set_key((void *)sesskey, &state->k3); + else +- des_set_key((void *)(sesskey + 16), state->k3); ++ DES_set_key((void *)(sesskey + 16), &state->k3); + + memset(state->iv1, 0, 8); + memset(state->iv2, 0, 8); +@@ -175,9 +177,9 @@ des3_encrypt(u_char *src, u_char *dst, int len, void * + estate = (struct des3_state *)state; + memcpy(estate->iv1, estate->iv2, 8); + +- des_ncbc_encrypt(src, dst, len, estate->k1, &estate->iv1, DES_ENCRYPT); +- des_ncbc_encrypt(dst, dst, len, estate->k2, &estate->iv2, DES_DECRYPT); +- des_ncbc_encrypt(dst, dst, len, estate->k3, &estate->iv3, DES_ENCRYPT); ++ DES_ncbc_encrypt(src, dst, len, &estate->k1, &estate->iv1, DES_ENCRYPT); ++ DES_ncbc_encrypt(dst, dst, len, &estate->k2, &estate->iv2, DES_DECRYPT); ++ DES_ncbc_encrypt(dst, dst, len, &estate->k3, &estate->iv3, DES_ENCRYPT); + } + + void +@@ -188,7 +190,7 @@ des3_decrypt(u_char *src, u_char *dst, int len, void * + dstate = (struct des3_state *)state; + memcpy(dstate->iv1, dstate->iv2, 8); + +- des_ncbc_encrypt(src, dst, len, dstate->k3, &dstate->iv3, DES_DECRYPT); +- des_ncbc_encrypt(dst, dst, len, dstate->k2, &dstate->iv2, DES_ENCRYPT); +- des_ncbc_encrypt(dst, dst, len, dstate->k1, &dstate->iv1, DES_DECRYPT); ++ DES_ncbc_encrypt(src, dst, len, &dstate->k3, &dstate->iv3, DES_DECRYPT); ++ DES_ncbc_encrypt(dst, dst, len, &dstate->k2, &dstate->iv2, DES_ENCRYPT); ++ DES_ncbc_encrypt(dst, dst, len, &dstate->k1, &dstate->iv1, DES_DECRYPT); + }