summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/aead/aeadtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libcrypto/aead/aeadtest.c')
-rw-r--r--src/regress/lib/libcrypto/aead/aeadtest.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/aead/aeadtest.c b/src/regress/lib/libcrypto/aead/aeadtest.c
index 4f0ab9fa3a..1b144c2615 100644
--- a/src/regress/lib/libcrypto/aead/aeadtest.c
+++ b/src/regress/lib/libcrypto/aead/aeadtest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: aeadtest.c,v 1.11 2018/07/17 17:06:49 tb Exp $ */ 1/* $OpenBSD: aeadtest.c,v 1.12 2019/01/22 00:59:21 dlg Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -52,8 +52,11 @@
52#include <stdlib.h> 52#include <stdlib.h>
53#include <string.h> 53#include <string.h>
54#include <stdint.h> 54#include <stdint.h>
55#include <unistd.h>
56#include <ctype.h>
55 57
56#include <openssl/evp.h> 58#include <openssl/evp.h>
59#include <openssl/err.h>
57 60
58/* This program tests an AEAD against a series of test vectors from a file. The 61/* This program tests an AEAD against a series of test vectors from a file. The
59 * test vector file consists of key-value lines where the key and value are 62 * test vector file consists of key-value lines where the key and value are
@@ -135,6 +138,12 @@ aead_from_name(const EVP_AEAD **aead, const char *name)
135#else 138#else
136 fprintf(stderr, "No chacha20-poly1305 support.\n"); 139 fprintf(stderr, "No chacha20-poly1305 support.\n");
137#endif 140#endif
141 } else if (strcmp(name, "xchacha20-poly1305") == 0) {
142#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
143 *aead = EVP_aead_xchacha20_poly1305();
144#else
145 fprintf(stderr, "No xchacha20-poly1305 support.\n");
146#endif
138 } else { 147 } else {
139 fprintf(stderr, "Unknown AEAD: %s\n", name); 148 fprintf(stderr, "Unknown AEAD: %s\n", name);
140 return -1; 149 return -1;