diff options
author | jsing <> | 2022-07-30 14:24:33 +0000 |
---|---|---|
committer | jsing <> | 2022-07-30 14:24:33 +0000 |
commit | d731a4cdf30d79f542ed9a2a769e96c0af82505d (patch) | |
tree | 86cba225ac2c607ac030c8bdd67281b0bed63476 /src | |
parent | 4a46d566ac5d30977b5d5104700857cea61cfa31 (diff) | |
download | openbsd-d731a4cdf30d79f542ed9a2a769e96c0af82505d.tar.gz openbsd-d731a4cdf30d79f542ed9a2a769e96c0af82505d.tar.bz2 openbsd-d731a4cdf30d79f542ed9a2a769e96c0af82505d.zip |
Less #ifndef OPENSSL_NO_*
We're not going to be compiling without AES or CHACHA/POLY1305 anytime
soon.
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libcrypto/aead/aeadtest.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/regress/lib/libcrypto/aead/aeadtest.c b/src/regress/lib/libcrypto/aead/aeadtest.c index 71b3a2f243..50072de0e9 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.15 2022/07/30 14:09:00 jsing Exp $ */ | 1 | /* $OpenBSD: aeadtest.c,v 1.16 2022/07/30 14:24:33 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -89,29 +89,13 @@ aead_from_name(const EVP_AEAD **aead, const char *name) | |||
89 | *aead = NULL; | 89 | *aead = NULL; |
90 | 90 | ||
91 | if (strcmp(name, "aes-128-gcm") == 0) { | 91 | if (strcmp(name, "aes-128-gcm") == 0) { |
92 | #ifndef OPENSSL_NO_AES | ||
93 | *aead = EVP_aead_aes_128_gcm(); | 92 | *aead = EVP_aead_aes_128_gcm(); |
94 | #else | ||
95 | fprintf(stderr, "No AES support.\n"); | ||
96 | #endif | ||
97 | } else if (strcmp(name, "aes-256-gcm") == 0) { | 93 | } else if (strcmp(name, "aes-256-gcm") == 0) { |
98 | #ifndef OPENSSL_NO_AES | ||
99 | *aead = EVP_aead_aes_256_gcm(); | 94 | *aead = EVP_aead_aes_256_gcm(); |
100 | #else | ||
101 | fprintf(stderr, "No AES support.\n"); | ||
102 | #endif | ||
103 | } else if (strcmp(name, "chacha20-poly1305") == 0) { | 95 | } else if (strcmp(name, "chacha20-poly1305") == 0) { |
104 | #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) | ||
105 | *aead = EVP_aead_chacha20_poly1305(); | 96 | *aead = EVP_aead_chacha20_poly1305(); |
106 | #else | ||
107 | fprintf(stderr, "No chacha20-poly1305 support.\n"); | ||
108 | #endif | ||
109 | } else if (strcmp(name, "xchacha20-poly1305") == 0) { | 97 | } else if (strcmp(name, "xchacha20-poly1305") == 0) { |
110 | #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) | ||
111 | *aead = EVP_aead_xchacha20_poly1305(); | 98 | *aead = EVP_aead_xchacha20_poly1305(); |
112 | #else | ||
113 | fprintf(stderr, "No xchacha20-poly1305 support.\n"); | ||
114 | #endif | ||
115 | } else { | 99 | } else { |
116 | fprintf(stderr, "Unknown AEAD: %s\n", name); | 100 | fprintf(stderr, "Unknown AEAD: %s\n", name); |
117 | return -1; | 101 | return -1; |