summaryrefslogtreecommitdiff
path: root/regress/sys/crypto
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-04-03 18:42:17 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-04-03 18:42:17 +0000
commit5c45b992a96d01870cb67b37bf67e19d0321cb73 (patch)
tree2891c0a20a483496cb051075eb028d9b361f7cd5 /regress/sys/crypto
parent523414f874ffb7516cb26c3670b8efc11a763d7b (diff)
o fix warnings.
o rearrange headers. o remove unused var. markus@ ok
Diffstat (limited to 'regress/sys/crypto')
-rw-r--r--regress/sys/crypto/auth/md5.c7
-rw-r--r--regress/sys/crypto/enc/des3.c12
2 files changed, 11 insertions, 8 deletions
diff --git a/regress/sys/crypto/auth/md5.c b/regress/sys/crypto/auth/md5.c
index 4b64f419306..787d5c961bb 100644
--- a/regress/sys/crypto/auth/md5.c
+++ b/regress/sys/crypto/auth/md5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md5.c,v 1.1 2002/03/21 15:08:53 markus Exp $ */
+/* $OpenBSD: md5.c,v 1.2 2002/04/03 18:42:15 fgsch Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserverd.
@@ -29,10 +29,11 @@
#include <sys/ioctl.h>
#include <sys/sysctl.h>
#include <crypto/cryptodev.h>
-#include <stdio.h>
+#include <err.h>
#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
#include <unistd.h>
-#include <err.h>
#define MD5LEN 16
diff --git a/regress/sys/crypto/enc/des3.c b/regress/sys/crypto/enc/des3.c
index c5438870de9..ef34081cb07 100644
--- a/regress/sys/crypto/enc/des3.c
+++ b/regress/sys/crypto/enc/des3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: des3.c,v 1.2 2002/03/25 10:00:47 markus Exp $ */
+/* $OpenBSD: des3.c,v 1.3 2002/04/03 18:42:16 fgsch Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserverd.
@@ -29,11 +29,13 @@
#include <sys/ioctl.h>
#include <sys/sysctl.h>
#include <crypto/cryptodev.h>
-#include <stdio.h>
+#include <des.h>
+#include <err.h>
#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
-#include <err.h>
-#include <des.h>
int
syscrypt(const unsigned char *key, size_t klen, const unsigned char *iv,
@@ -41,7 +43,7 @@ syscrypt(const unsigned char *key, size_t klen, const unsigned char *iv,
{
struct session_op session;
struct crypt_op cryp;
- int cryptodev_fd = -1, fd = -1, i;
+ int cryptodev_fd = -1, fd = -1;
if ((cryptodev_fd = open("/dev/crypto", O_RDWR, 0)) < 0) {
warn("/dev/crypto");