diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-02-10 16:09:01 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-02-10 16:09:01 -0500 |
commit | 1df701c082761775d311a966a222bca116afc3c2 (patch) | |
tree | f459cdfa82c076362bf2fc465351d7533adf8e2a /src/common/tortls.c | |
parent | 791ceb202810258ecbe3eafd9c2b8bdfd6a7a4f1 (diff) | |
parent | 4de20d175476ab684ca15ea794af729348297540 (diff) | |
download | tor-1df701c082761775d311a966a222bca116afc3c2.tar.gz tor-1df701c082761775d311a966a222bca116afc3c2.zip |
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r-- | src/common/tortls.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index bff59833ff..50609b8ac7 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -570,13 +570,35 @@ tor_tls_create_certificate,(crypto_pk_t *rsa, /** List of ciphers that servers should select from when the client might be * claiming extra unsupported ciphers in order to avoid fingerprinting. */ -#define SERVER_CIPHER_LIST \ - (TLS1_TXT_DHE_RSA_WITH_AES_256_SHA ":" \ - TLS1_TXT_DHE_RSA_WITH_AES_128_SHA) +static const char SERVER_CIPHER_LIST[] = +#ifdef TLS1_3_TXT_AES_128_GCM_SHA256 + /* This one can never actually get selected, since if the client lists it, + * we will assume that the client is honest, and not use this list. + * Nonetheless we list it if it's available, so that the server doesn't + * conclude that it has no valid ciphers if it's running with TLS1.3. + */ + TLS1_3_TXT_AES_128_GCM_SHA256 ":" +#endif + TLS1_TXT_DHE_RSA_WITH_AES_256_SHA ":" + TLS1_TXT_DHE_RSA_WITH_AES_128_SHA; /** List of ciphers that servers should select from when we actually have * our choice of what cipher to use. */ static const char UNRESTRICTED_SERVER_CIPHER_LIST[] = + /* Here are the TLS 1.3 ciphers we like, in the order we prefer. */ +#ifdef TLS1_3_TXT_AES_256_GCM_SHA384 + TLS1_3_TXT_AES_256_GCM_SHA384 ":" +#endif +#ifdef TLS1_3_TXT_CHACHA20_POLY1305_SHA256 + TLS1_3_TXT_CHACHA20_POLY1305_SHA256 ":" +#endif +#ifdef TLS1_3_TXT_AES_128_GCM_SHA256 + TLS1_3_TXT_AES_128_GCM_SHA256 ":" +#endif +#ifdef TLS1_3_TXT_AES_128_CCM_SHA256 + TLS1_3_TXT_AES_128_CCM_SHA256 ":" +#endif + /* This list is autogenerated with the gen_server_ciphers.py script; * don't hand-edit it. */ #ifdef TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |