summaryrefslogtreecommitdiff
path: root/umac.c
diff options
context:
space:
mode:
authordtucker <dtucker>2012-10-05 02:11:33 +0000
committerdtucker <dtucker>2012-10-05 02:11:33 +0000
commit42e59962675146dde9be5ec265239f2a9836e412 (patch)
tree104e3ceabf2ad9fe09b7b1c6cc4ef6cbb0e1c33f /umac.c
parentd095e121c2732d95c3b017422c606e6e1aead000 (diff)
downloadopenssh-42e59962675146dde9be5ec265239f2a9836e412.tar.gz
- [umac.c] Enforce allowed umac output sizes. From djm@.
Diffstat (limited to 'umac.c')
-rw-r--r--umac.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/umac.c b/umac.c
index e373de5b..0567c37f 100644
--- a/umac.c
+++ b/umac.c
@@ -55,6 +55,12 @@
#ifndef UMAC_OUTPUT_LEN
#define UMAC_OUTPUT_LEN 8 /* Alowable: 4, 8, 12, 16 */
#endif
+
+#if UMAC_OUTPUT_LEN != 4 && UMAC_OUTPUT_LEN != 8 && \
+ UMAC_OUTPUT_LEN != 12 && UMAC_OUTPUT_LEN != 16
+# error UMAC_OUTPUT_LEN must be defined to 4, 8, 12 or 16
+#endif
+
/* #define FORCE_C_ONLY 1 ANSI C and 64-bit integers req'd */
/* #define AES_IMPLEMENTAION 1 1 = OpenSSL, 2 = Barreto, 3 = Gladman */
/* #define SSE2 0 Is SSE2 is available? */