Skip to content

Commit 93e0f85

Browse files
committed
prefer AES CTR over GCM to make old servers happy
1 parent 8afa3fc commit 93e0f85

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/crypt.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,16 +340,17 @@ static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_3des_cbc = {
340340
#endif
341341

342342
static const LIBSSH2_CRYPT_METHOD *_libssh2_crypt_methods[] = {
343-
#if LIBSSH2_AES_GCM
344-
&libssh2_crypt_method_aes256_gcm,
345-
&libssh2_crypt_method_aes128_gcm,
346-
#endif /* LIBSSH2_AES_GCM */
347-
348343
#if LIBSSH2_AES_CTR
349344
&libssh2_crypt_method_aes128_ctr,
350345
&libssh2_crypt_method_aes192_ctr,
351346
&libssh2_crypt_method_aes256_ctr,
352347
#endif /* LIBSSH2_AES */
348+
349+
#if LIBSSH2_AES_GCM
350+
&libssh2_crypt_method_aes256_gcm,
351+
&libssh2_crypt_method_aes128_gcm,
352+
#endif /* LIBSSH2_AES_GCM */
353+
353354
#if LIBSSH2_AES
354355
&libssh2_crypt_method_aes256_cbc,
355356
&libssh2_crypt_method_rijndael_cbc_lysator_liu_se, /* == aes256-cbc */

0 commit comments

Comments
 (0)