summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2010-10-15 10:18:43 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2010-10-15 10:18:43 +0000
commit89306d994fe40773e352c112b7fa88c304e8ffe9 (patch)
treeff163bb612b75e16312b655956e852e998b971fc /usr.sbin/ppp
parentb3298c6a74262bc14f1776c9b440c15dbbf0127e (diff)
Switch the remaining users of libdes in src to libcrypto,
telnet portion partially from the latest heimdal. ok mikeb@
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/ppp/Makefile6
-rw-r--r--usr.sbin/ppp/ppp/chap_ms.c16
2 files changed, 9 insertions, 13 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 */