mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-27 22:33:15 +08:00
prefer libcrypto chacha20-poly1305 where possible
This commit is contained in:
parent
bc5c5d01ad
commit
abe2b245b3
@ -103,7 +103,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
|
||||
ssh-ed25519-sk.o ssh-rsa.o dh.o \
|
||||
msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \
|
||||
ssh-pkcs11.o smult_curve25519_ref.o \
|
||||
poly1305.o chacha.o cipher-chachapoly.o \
|
||||
poly1305.o chacha.o cipher-chachapoly.o cipher-chachapoly-libcrypto.o \
|
||||
ssh-ed25519.o digest-openssl.o digest-libc.o \
|
||||
hmac.o sc25519.o ge25519.o fe25519.o ed25519.o verify.o hash.o \
|
||||
kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#if defined(HAVE_EVP_CHACHA20) || !defined(HAVE_BROKEN_CHACHA20)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdarg.h> /* needed for log.h */
|
||||
#include <string.h>
|
||||
@ -158,3 +160,4 @@ chachapoly_get_length(struct chachapoly_ctx *ctx,
|
||||
*plenp = PEEK_U32(buf);
|
||||
return 0;
|
||||
}
|
||||
#endif /* defined(HAVE_EVP_CHACHA20) && !defined(HAVE_BROKEN_CHACHA20) */
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#if !defined(HAVE_EVP_CHACHA20) || defined(HAVE_BROKEN_CHACHA20)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdarg.h> /* needed for log.h */
|
||||
#include <string.h>
|
||||
@ -130,3 +132,5 @@ chachapoly_get_length(struct chachapoly_ctx *ctx,
|
||||
*plenp = PEEK_U32(buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !defined(HAVE_EVP_CHACHA20) || defined(HAVE_BROKEN_CHACHA20) */
|
||||
|
@ -2804,6 +2804,7 @@ if test "x$openssl" = "xyes" ; then
|
||||
EVP_PKEY_get0_RSA \
|
||||
EVP_MD_CTX_new \
|
||||
EVP_MD_CTX_free \
|
||||
EVP_chacha20 \
|
||||
])
|
||||
|
||||
if test "x$openssl_engine" = "xyes" ; then
|
||||
|
@ -62,6 +62,12 @@ void ssh_libcrypto_init(void);
|
||||
# define OPENSSL_DSA_MAX_MODULUS_BITS 10000
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_VERSION_NUMBER
|
||||
# if LIBRESSL_VERSION_NUMBER >= 0x3010000fL
|
||||
# define HAVE_BROKEN_CHACHA20
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_HAVE_EVPCTR
|
||||
# define EVP_aes_128_ctr evp_aes_128_ctr
|
||||
# define EVP_aes_192_ctr evp_aes_128_ctr
|
||||
|
Loading…
Reference in New Issue
Block a user