libdes is going away from src, this moves dsniff to libcrypto

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/dsniff/Makefile,v
retrieving revision 1.48
diff -u -p -r1.48 Makefile
--- Makefile    30 Jul 2010 23:13:30 -0000      1.48
+++ Makefile    15 Oct 2010 17:05:49 -0000
@@ -3,7 +3,7 @@
 COMMENT=       sniffing tools for penetration testing
 
 DISTNAME=      dsniff-2.3
-REVISION=      10
+REVISION=      11
 CATEGORIES=    security
 
 MASTER_SITES=  http://monkey.org/~dugsong/dsniff/
@@ -19,7 +19,7 @@ PERMIT_PACKAGE_CDROM= Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB=               c crypto des pcap ssl rpcsvc
+WANTLIB=               c crypto pcap ssl rpcsvc
 
 AUTOCONF_VERSION=      2.13
 CONFIGURE_STYLE=       autoconf
Index: patches/patch-configure_in
===================================================================
RCS file: /cvs/ports/security/dsniff/patches/patch-configure_in,v
retrieving revision 1.3
diff -u -p -r1.3 patch-configure_in
--- patches/patch-configure_in  24 May 2005 00:15:06 -0000      1.3
+++ patches/patch-configure_in  15 Oct 2010 17:05:49 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-configure_in,v 1.3 2005/05/24 00:15:06 mjc Exp $
---- configure.in.orig  Sat Dec  2 21:16:50 2000
-+++ configure.in       Sun May 22 12:31:54 2005
+--- configure.in.orig  Sun Dec  3 06:16:50 2000
++++ configure.in       Fri Oct 15 18:47:09 2010
 @@ -109,13 +109,13 @@ AC_ARG_WITH(db,
        AC_DEFINE(HAVE_DB_185_H)
        DBINC="-I$withval/dist"
@@ -45,28 +45,3 @@ $OpenBSD: patch-configure_in,v 1.3 2005/
    elif test -f /usr/include/libnet.h; then
       CFLAGS="$CFLAGS `libnet-config --defines`"
       LNETLIB="-lnet"
-@@ -307,7 +307,7 @@ AC_ARG_WITH(openssl,
-       owd=`pwd`
-       if cd $withval; then withval=`pwd`; cd $owd; fi
-       SSLINC="-I$withval/include"
--      SSLLIB="-L$withval/lib -lssl -lcrypto"
-+      SSLLIB="-L$withval/lib -lssl -lcrypto -ldes"
-      else
-         AC_ERROR(ssl.h or libssl.a not found in $withval)
-      fi
-@@ -316,12 +316,12 @@ AC_ARG_WITH(openssl,
-   esac ],
- [ if test -f ${prefix}/include/openssl/ssl.h; then
-      SSLINC="-I${prefix}/include"
--     SSLLIB="-L${prefix}/lib -lssl -lcrypto"
-+     SSLLIB="-L${prefix}/lib -lssl -lcrypto -ldes"
-   elif test -f ${prefix}/ssl/include/openssl/ssl.h; then
-      SSLINC="-I${prefix}/ssl/include"
--     SSLLIB="-L${prefix}/ssl/lib -lssl -lcrypto"
-+     SSLLIB="-L${prefix}/ssl/lib -lssl -lcrypto -ldes"
-   elif test -f /usr/include/openssl/ssl.h; then
--     SSLLIB="-lssl -lcrypto"
-+     SSLLIB="-lssl -lcrypto -ldes"
-   else
-      AC_MSG_RESULT(no)
-      AC_ERROR(OpenSSL not found)
Index: patches/patch-sshcrypto_c
===================================================================
RCS file: /cvs/ports/security/dsniff/patches/patch-sshcrypto_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-sshcrypto_c
--- patches/patch-sshcrypto_c   7 Jun 2002 03:57:05 -0000       1.1
+++ patches/patch-sshcrypto_c   15 Oct 2010 17:05:49 -0000
@@ -1,13 +1,66 @@
 $OpenBSD: patch-sshcrypto_c,v 1.1 2002/06/07 03:57:05 pvalchev Exp $
---- sshcrypto.c.orig   Tue Nov 28 14:23:28 2000
-+++ sshcrypto.c        Tue May 28 16:25:30 2002
+--- sshcrypto.c.orig   Tue Nov 28 22:23:28 2000
++++ sshcrypto.c        Fri Oct 15 19:03:56 2010
 @@ -15,7 +15,9 @@
  #include <sys/types.h>
  #include <openssl/ssl.h>
  
-+#include <des.h>
++#include <openssl/des.h>
  #include <err.h>
 +#include <ssl/blowfish.h>
  #include <stdio.h>
  #include <stdlib.h>
  
+@@ -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);
+ }

Reply via email to