diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-10-15 10:39:13 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-10-15 10:39:13 +0000 |
commit | 99df037cb5105a4c07a74582022b497e49b86c94 (patch) | |
tree | 6ddcaf0952482033bb7e8f79cd33714c9e307e90 /regress | |
parent | 89306d994fe40773e352c112b7fa88c304e8ffe9 (diff) |
libdes -> libcrypto
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sbin/isakmpd/crypto/Makefile | 6 | ||||
-rw-r--r-- | regress/sys/crypto/enc/Makefile | 6 | ||||
-rw-r--r-- | regress/sys/crypto/enc/des3.c | 20 |
3 files changed, 16 insertions, 16 deletions
diff --git a/regress/sbin/isakmpd/crypto/Makefile b/regress/sbin/isakmpd/crypto/Makefile index a0877a51c92..7c34012e51b 100644 --- a/regress/sbin/isakmpd/crypto/Makefile +++ b/regress/sbin/isakmpd/crypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2005/04/08 17:12:48 cloder Exp $ +# $OpenBSD: Makefile,v 1.2 2010/10/15 10:39:12 jsg Exp $ # $EOM: Makefile,v 1.7 2000/03/28 21:22:06 ho Exp $ # Test Crypto: @@ -12,8 +12,8 @@ OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/openbsd -I${TOPOBJ} -Wall \ -DUSE_TRIPLEDES -DUSE_CAST -DUSE_BLOWFISH -DUSE_DES \ -DUSE_AES -LDADD+= -lcrypto -ldes -DPADD+= ${LIBCRYPTO} ${LIBDES} +LDADD+= -lcrypto +DPADD+= ${LIBCRYPTO} NOMAN= DEBUG= -g diff --git a/regress/sys/crypto/enc/Makefile b/regress/sys/crypto/enc/Makefile index fd1b18dc8ad..cc29b32f43a 100644 --- a/regress/sys/crypto/enc/Makefile +++ b/regress/sys/crypto/enc/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.4 2004/12/29 04:28:39 david Exp $ +# $OpenBSD: Makefile,v 1.5 2010/10/15 10:39:12 jsg Exp $ PROG= des3 -LDADD=-ldes -DPADD=${LIBDES} +LDADD=-lcrypto +DPADD=${LIBCRYPTO} REGRESS_ROOT_TARGETS= run-regress-${PROG} diff --git a/regress/sys/crypto/enc/des3.c b/regress/sys/crypto/enc/des3.c index 07c55792a1a..024418d71d0 100644 --- a/regress/sys/crypto/enc/des3.c +++ b/regress/sys/crypto/enc/des3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: des3.c,v 1.7 2004/07/22 15:11:37 miod Exp $ */ +/* $OpenBSD: des3.c,v 1.8 2010/10/15 10:39:12 jsg Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. @@ -29,7 +29,7 @@ #include <sys/ioctl.h> #include <sys/sysctl.h> #include <crypto/cryptodev.h> -#include <des.h> +#include <openssl/des.h> #include <err.h> #include <fcntl.h> #include <stdio.h> @@ -146,7 +146,7 @@ match(unsigned char *a, unsigned char *b, size_t len) int main(int argc, char **argv) { - des_key_schedule ks1, ks2, ks3; + DES_key_schedule ks1, ks2, ks3; unsigned char iv0[8], iv[8], key[24] = "012345670123456701234567"; unsigned char b1[SZ], b2[SZ]; int allowed = 0, i, fail = 0; @@ -174,14 +174,14 @@ main(int argc, char **argv) memset(b2, 0, sizeof(b2)); /* keysetup for software */ - des_set_key((void *) key, ks1); - des_set_key((void *) (key+8), ks2); - des_set_key((void *) (key+16), ks3); + DES_set_key((void *) key, &ks1); + DES_set_key((void *) (key+8), &ks2); + DES_set_key((void *) (key+16), &ks3); /* encrypt with software, decrypt with /dev/crypto */ memcpy(iv, iv0, sizeof(iv0)); - des_ede3_cbc_encrypt((void *)b1, (void*)b2, sizeof(b1), ks1, ks2, ks3, - (void*)iv, DES_ENCRYPT); + DES_ede3_cbc_encrypt((void *)b1, (void*)b2, sizeof(b1), &ks1, &ks2, + &ks3, (void*)iv, DES_ENCRYPT); memcpy(iv, iv0, sizeof(iv0)); if (syscrypt(key, sizeof(key), iv, b2, b2, sizeof(b1), 0) < 0) { warnx("decrypt with /dev/crypto failed"); @@ -200,8 +200,8 @@ main(int argc, char **argv) fail++; } memcpy(iv, iv0, sizeof(iv0)); - des_ede3_cbc_encrypt((void *)b2, (void*)b2, sizeof(b1), ks1, ks2, ks3, - (void*)iv, DES_DECRYPT); + DES_ede3_cbc_encrypt((void *)b2, (void*)b2, sizeof(b1), &ks1, &ks2, + &ks3, (void*)iv, DES_DECRYPT); if (!match(b1, b2, sizeof(b1))) fail++; else |