summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/aeswrap
diff options
context:
space:
mode:
authormiod <>2014-06-01 11:11:46 +0000
committermiod <>2014-06-01 11:11:46 +0000
commit8feed9c0b8cf35589d2442426a7f5c022f055e9d (patch)
tree764f224e0d43a606966be44aaee32715ee508747 /src/regress/lib/libcrypto/aeswrap
parente356b447e74b757810a71e2bf8e431b22fd6e328 (diff)
downloadopenbsd-8feed9c0b8cf35589d2442426a7f5c022f055e9d.tar.gz
openbsd-8feed9c0b8cf35589d2442426a7f5c022f055e9d.tar.bz2
openbsd-8feed9c0b8cf35589d2442426a7f5c022f055e9d.zip
Build these tests with WARNINGS=Yes and -Werror, and do the necessary
fixes to keep building.
Diffstat (limited to 'src/regress/lib/libcrypto/aeswrap')
-rw-r--r--src/regress/lib/libcrypto/aeswrap/Makefile4
-rw-r--r--src/regress/lib/libcrypto/aeswrap/aes_wrap.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/aeswrap/Makefile b/src/regress/lib/libcrypto/aeswrap/Makefile
index c869e5f4d2..45234533c5 100644
--- a/src/regress/lib/libcrypto/aeswrap/Makefile
+++ b/src/regress/lib/libcrypto/aeswrap/Makefile
@@ -1,7 +1,9 @@
1# $OpenBSD: Makefile,v 1.2 2014/05/30 15:17:43 jsing Exp $ 1# $OpenBSD: Makefile,v 1.3 2014/06/01 11:11:45 miod Exp $
2 2
3PROG= aes_wrap 3PROG= aes_wrap
4LDADD= -lcrypto 4LDADD= -lcrypto
5DPADD= ${LIBCRYPTO} 5DPADD= ${LIBCRYPTO}
6WARNINGS= Yes
7CFLAGS+= -Werror
6 8
7.include <bsd.regress.mk> 9.include <bsd.regress.mk>
diff --git a/src/regress/lib/libcrypto/aeswrap/aes_wrap.c b/src/regress/lib/libcrypto/aeswrap/aes_wrap.c
index b5157d715c..c0c56327f1 100644
--- a/src/regress/lib/libcrypto/aeswrap/aes_wrap.c
+++ b/src/regress/lib/libcrypto/aeswrap/aes_wrap.c
@@ -53,9 +53,13 @@
53 53
54#include <stdio.h> 54#include <stdio.h>
55#include <stdlib.h> 55#include <stdlib.h>
56#include <string.h>
56 57
57#include <openssl/aes.h> 58#include <openssl/aes.h>
58 59
60int AES_wrap_unwrap_test(const unsigned char *, int, const unsigned char *,
61 const unsigned char *, const unsigned char *, int);
62
59int 63int
60AES_wrap_unwrap_test(const unsigned char *kek, int keybits, 64AES_wrap_unwrap_test(const unsigned char *kek, int keybits,
61 const unsigned char *iv, const unsigned char *eout, 65 const unsigned char *iv, const unsigned char *eout,
@@ -150,7 +154,6 @@ main(int argc, char **argv)
150 0xfb, 0x98, 0x8b, 0x9b, 0x7a, 0x02, 0xdd, 0x21 154 0xfb, 0x98, 0x8b, 0x9b, 0x7a, 0x02, 0xdd, 0x21
151 }; 155 };
152 156
153 AES_KEY wctx, xctx;
154 int ret, nfailures = 0; 157 int ret, nfailures = 0;
155 ret = AES_wrap_unwrap_test(kek, 128, NULL, e1, key, 16); 158 ret = AES_wrap_unwrap_test(kek, 128, NULL, e1, key, 16);
156 if (ret == 0) 159 if (ret == 0)