From 93e0f856f1a4a750be3785688cde876f9572c84e Mon Sep 17 00:00:00 2001 From: Anders Borum Date: Wed, 20 Sep 2023 10:01:36 +0200 Subject: [PATCH] prefer AES CTR over GCM to make old servers happy --- src/crypt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/crypt.c b/src/crypt.c index ca9ca039a0..9301e0dc12 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -340,16 +340,17 @@ static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_3des_cbc = { #endif static const LIBSSH2_CRYPT_METHOD *_libssh2_crypt_methods[] = { -#if LIBSSH2_AES_GCM - &libssh2_crypt_method_aes256_gcm, - &libssh2_crypt_method_aes128_gcm, -#endif /* LIBSSH2_AES_GCM */ - #if LIBSSH2_AES_CTR &libssh2_crypt_method_aes128_ctr, &libssh2_crypt_method_aes192_ctr, &libssh2_crypt_method_aes256_ctr, #endif /* LIBSSH2_AES */ + +#if LIBSSH2_AES_GCM + &libssh2_crypt_method_aes256_gcm, + &libssh2_crypt_method_aes128_gcm, +#endif /* LIBSSH2_AES_GCM */ + #if LIBSSH2_AES &libssh2_crypt_method_aes256_cbc, &libssh2_crypt_method_rijndael_cbc_lysator_liu_se, /* == aes256-cbc */