diff options
author | miod <> | 2014-06-01 11:11:46 +0000 |
---|---|---|
committer | miod <> | 2014-06-01 11:11:46 +0000 |
commit | 8feed9c0b8cf35589d2442426a7f5c022f055e9d (patch) | |
tree | 764f224e0d43a606966be44aaee32715ee508747 /src/regress/lib/libcrypto/aeswrap | |
parent | e356b447e74b757810a71e2bf8e431b22fd6e328 (diff) | |
download | openbsd-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/Makefile | 4 | ||||
-rw-r--r-- | src/regress/lib/libcrypto/aeswrap/aes_wrap.c | 5 |
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 | ||
3 | PROG= aes_wrap | 3 | PROG= aes_wrap |
4 | LDADD= -lcrypto | 4 | LDADD= -lcrypto |
5 | DPADD= ${LIBCRYPTO} | 5 | DPADD= ${LIBCRYPTO} |
6 | WARNINGS= Yes | ||
7 | CFLAGS+= -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 | ||
60 | int AES_wrap_unwrap_test(const unsigned char *, int, const unsigned char *, | ||
61 | const unsigned char *, const unsigned char *, int); | ||
62 | |||
59 | int | 63 | int |
60 | AES_wrap_unwrap_test(const unsigned char *kek, int keybits, | 64 | AES_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) |