summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2010-10-15 10:18:42 +0000
committerjsg <jsg@openbsd.org>2010-10-15 10:18:42 +0000
commit0456bce5ebf490b4e5b9e2f657320d83e08788a1 (patch)
treeb128b0be04bff6ac48bf925c4bf8e6d9ed6e866b /usr.sbin
parentNo need to remove RCS_PARSE flag from rf_flags after successfully parsing. (diff)
downloadwireguard-openbsd-0456bce5ebf490b4e5b9e2f657320d83e08788a1.tar.xz
wireguard-openbsd-0456bce5ebf490b4e5b9e2f657320d83e08788a1.zip
Switch the remaining users of libdes in src to libcrypto,
telnet portion partially from the latest heimdal. ok mikeb@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/Makefile6
-rw-r--r--usr.sbin/ppp/ppp/chap_ms.c16
-rw-r--r--usr.sbin/tokenadm/Makefile6
-rw-r--r--usr.sbin/tokeninit/Makefile6
4 files changed, 15 insertions, 19 deletions
diff --git a/usr.sbin/ppp/ppp/Makefile b/usr.sbin/ppp/ppp/Makefile
index a00f6bee1fc..d8a8bb1cfe9 100644
--- a/usr.sbin/ppp/ppp/Makefile
+++ b/usr.sbin/ppp/ppp/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.28 2005/09/22 00:08:24 brad Exp $
+# $OpenBSD: Makefile,v 1.29 2010/10/15 10:18:42 jsg Exp $
PROG= ppp
SRCS= alias.c alias_cuseeme.c alias_db.c alias_ftp.c alias_irc.c \
@@ -13,8 +13,8 @@ SRCS= alias.c alias_cuseeme.c alias_db.c alias_ftp.c alias_irc.c \
CFLAGS+=-Wall -DNO_FW_PUNCH -DNOI4B -DNONETGRAPH
CFLAGS+=-DLOCALNAT -DLOCALRAD
M4FLAGS=-DLOCALNAT -DLOCALRAD
-LDADD+= -lcrypto -ldes -lutil -lz
-DPADD+= ${LIBDES} ${LIBUTIL} ${LIBZ} ${LIBCRYPTO}
+LDADD+= -lcrypto -lutil -lz
+DPADD+= ${LIBUTIL} ${LIBZ} ${LIBCRYPTO}
.if defined(NOSUID) || defined(PPP_NOSUID)
BINMODE=554
.else
diff --git a/usr.sbin/ppp/ppp/chap_ms.c b/usr.sbin/ppp/ppp/chap_ms.c
index 1f153a60d88..41d2589a844 100644
--- a/usr.sbin/ppp/ppp/chap_ms.c
+++ b/usr.sbin/ppp/ppp/chap_ms.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: chap_ms.c,v 1.12 2002/06/15 08:02:00 brian Exp $
+ * $OpenBSD: chap_ms.c,v 1.13 2010/10/15 10:18:42 jsg Exp $
*/
#include <ctype.h>
@@ -36,11 +36,7 @@
#else
#include <sys/types.h>
#include <stdlib.h>
-#ifdef __NetBSD__
#include <openssl/des.h>
-#else
-#include <des.h>
-#endif
#include <openssl/sha.h>
#endif
#include <md4.h>
@@ -103,18 +99,18 @@ MakeKey(u_char *key, u_char *des_key)
des_key[6] = Get7Bits(key, 42);
des_key[7] = Get7Bits(key, 49);
- des_set_odd_parity((des_cblock *)des_key);
+ DES_set_odd_parity((DES_cblock *)des_key);
}
static void /* IN 8 octets IN 7 octest OUT 8 octets */
DesEncrypt(u_char *clear, u_char *key, u_char *cipher)
{
- des_cblock des_key;
- des_key_schedule key_schedule;
+ DES_cblock des_key;
+ DES_key_schedule key_schedule;
MakeKey(key, des_key);
- des_set_key(&des_key, key_schedule);
- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
+ DES_set_key(&des_key, &key_schedule);
+ DES_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, &key_schedule, 1);
}
static void /* IN 8 octets IN 16 octets OUT 24 octets */
diff --git a/usr.sbin/tokenadm/Makefile b/usr.sbin/tokenadm/Makefile
index a6cd8121a7e..709dbbf844c 100644
--- a/usr.sbin/tokenadm/Makefile
+++ b/usr.sbin/tokenadm/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.2 2003/07/18 21:18:51 david Exp $
+# $OpenBSD: Makefile,v 1.3 2010/10/15 10:18:42 jsg Exp $
PROG= tokenadm
SRCS= tokenadm.c init.c tokendb.c
MAN= tokenadm.8
-LDADD+= -ldes
-DPADD= ${LIBDES}
+LDADD+= -lcrypto
+DPADD= ${LIBCRYPTO}
CFLAGS+=-I${.CURDIR}/../../libexec/login_token
.PATH: ${.CURDIR}/../../libexec/login_token
diff --git a/usr.sbin/tokeninit/Makefile b/usr.sbin/tokeninit/Makefile
index b394581bd95..9aa5f44c859 100644
--- a/usr.sbin/tokeninit/Makefile
+++ b/usr.sbin/tokeninit/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.2 2003/07/18 21:18:51 david Exp $
+# $OpenBSD: Makefile,v 1.3 2010/10/15 10:18:42 jsg Exp $
PROG= tokeninit
SRCS= tokeninit.c init.c token.c tokendb.c
MAN= tokeninit.8
-LDADD+= -ldes
-DPADD= ${LIBDES}
+LDADD+= -lcrypto
+DPADD= ${LIBCRYPTO}
CFLAGS+=-I${.CURDIR}/../../libexec/login_token
.PATH: ${.CURDIR}/../../libexec/login_token