diff options
author | Simon Josefsson <simon@josefsson.org> | 2004-08-16 21:01:00 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2004-08-16 21:01:00 +0000 |
commit | fd65f11ed1ba42b00cf4ba5342da7d4ffae05199 (patch) | |
tree | aa8eb470257be52b8e7ca618ca823c54c4cb22e6 | |
parent | 4f1884280397e0c0131095be8d6184495e43e5bf (diff) | |
download | gnutls-fd65f11ed1ba42b00cf4ba5342da7d4ffae05199.tar.gz |
Support AES-256 and DES in --ciphers too.
-rw-r--r-- | src/common.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c index 8d071dbefb..566c6555b2 100644 --- a/src/common.c +++ b/src/common.c @@ -1,4 +1,5 @@ /* + * Copyright (C) 2004 Simon Josefsson * Copyright (C) 2000,2001,2002,2003 Nikos Mavroyanopoulos * Copyright (C) 2004 Free Software Foundation * @@ -546,9 +547,11 @@ void print_list(void) printf(", SSL3.0\n"); printf("Ciphers:"); - printf(" AES-128-CBC"); + printf(" AES-256-CBC"); + printf(", AES-128-CBC"); printf(", 3DES-CBC"); printf(", ARCFOUR"); + printf(", DES-CBC"); printf(", ARCFOUR-40\n"); printf("MACs:"); @@ -615,10 +618,14 @@ void parse_ciphers(char **ciphers, int nciphers, int *cipher_priority) if (ciphers != NULL && nciphers > 0) { for (j = i = 0; i < nciphers; i++) { - if (strncasecmp(ciphers[i], "AES", 3) == 0) + if (strncasecmp(ciphers[i], "AES-2", 5) == 0) + cipher_priority[j++] = GNUTLS_CIPHER_AES_256_CBC; + else if (strncasecmp(ciphers[i], "AES", 3) == 0) cipher_priority[j++] = GNUTLS_CIPHER_AES_128_CBC; else if (strncasecmp(ciphers[i], "3DE", 3) == 0) cipher_priority[j++] = GNUTLS_CIPHER_3DES_CBC; + else if (strncasecmp(ciphers[i], "DES", 3) == 0) + cipher_priority[j++] = GNUTLS_CIPHER_DES_CBC; else if (strcasecmp(ciphers[i], "ARCFOUR-40") == 0) cipher_priority[j++] = GNUTLS_CIPHER_ARCFOUR_40; else if (strcasecmp(ciphers[i], "ARCFOUR") == 0) |