diff options
author | tb <> | 2023-10-24 13:09:54 +0000 |
---|---|---|
committer | tb <> | 2023-10-24 13:09:54 +0000 |
commit | fb35c4b4f6b87177cd121d1f1811a2557cc872f8 (patch) | |
tree | 1c7f70a7a70d7c502c61a08c15821c129d4eaea0 /src/lib | |
parent | 9598150d383939f1e3d7e3c8319565ca9cb41d5c (diff) | |
download | openbsd-fb35c4b4f6b87177cd121d1f1811a2557cc872f8.tar.gz openbsd-fb35c4b4f6b87177cd121d1f1811a2557cc872f8.tar.bz2 openbsd-fb35c4b4f6b87177cd121d1f1811a2557cc872f8.zip |
Add chacha aliases for OpenSSL compatibility
OpenSSL has the 20 in the long and short names, so add aliases to the
existing names to make things work. In particular, EVP_get_cipherbyname()
will now return EVP_chacha20() for both 'ChaCha20' and 'chacha20'.
Found by Facundo Tuesca when trying to add LibreSSL support for ChaCha20 in
https://github.com/pyca/cryptography/pull/9209
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/evp/c_all.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/c_all.c b/src/lib/libcrypto/evp/c_all.c index 871abe6e9a..ec38b108c5 100644 --- a/src/lib/libcrypto/evp/c_all.c +++ b/src/lib/libcrypto/evp/c_all.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: c_all.c,v 1.32 2023/07/24 10:24:58 jsing Exp $ */ | 1 | /* $OpenBSD: c_all.c,v 1.33 2023/10/24 13:09:54 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -223,6 +223,8 @@ OpenSSL_add_all_ciphers_internal(void) | |||
223 | 223 | ||
224 | #ifndef OPENSSL_NO_CHACHA | 224 | #ifndef OPENSSL_NO_CHACHA |
225 | EVP_add_cipher(EVP_chacha20()); | 225 | EVP_add_cipher(EVP_chacha20()); |
226 | EVP_add_cipher_alias(SN_chacha20, "ChaCha20"); | ||
227 | EVP_add_cipher_alias(LN_chacha20, "chacha20"); | ||
226 | #endif | 228 | #endif |
227 | #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) | 229 | #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) |
228 | EVP_add_cipher(EVP_chacha20_poly1305()); | 230 | EVP_add_cipher(EVP_chacha20_poly1305()); |