Skip to content

Commit

Permalink
prefer AES CTR over GCM to make old servers happy
Browse files Browse the repository at this point in the history
  • Loading branch information
palmin committed Sep 20, 2023
1 parent 8afa3fc commit 93e0f85
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 93e0f85

Please sign in to comment.