You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.6 KiB

  1. commit a2919cab08fff3fad434c574506b5ae23b4db131
  2. Author: Pierre Cheynier <p.cheynier@criteo.com>
  3. Date: Thu Mar 21 16:15:47 2019 +0000
  4. BUG/MEDIUM: ssl: ability to set TLS 1.3 ciphers using ssl-default-server-ciphersuites
  5. Any attempt to put TLS 1.3 ciphers on servers failed with output 'unable
  6. to set TLS 1.3 cipher suites'.
  7. This was due to usage of SSL_CTX_set_cipher_list instead of
  8. SSL_CTX_set_ciphersuites in the TLS 1.3 block (protected by
  9. OPENSSL_VERSION_NUMBER >= 0x10101000L & so).
  10. This should be backported to 1.9 and 1.8.
  11. Signed-off-by: Pierre Cheynier <p.cheynier@criteo.com>
  12. Reported-by: Damien Claisse <d.claisse@criteo.com>
  13. Cc: Emeric Brun <ebrun@haproxy.com>
  14. (cherry picked from commit bc34cd1de2ee80de63b5c4d319a501fc0d4ea2f5)
  15. Signed-off-by: Willy Tarreau <w@1wt.eu>
  16. (cherry picked from commit 4a8b9e3d5f4e76295c571900771fd1728bec474f)
  17. Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
  18. diff --git a/src/ssl_sock.c b/src/ssl_sock.c
  19. index afdb1fce..fbb7cf2b 100644
  20. --- a/src/ssl_sock.c
  21. +++ b/src/ssl_sock.c
  22. @@ -4696,7 +4696,7 @@ int ssl_sock_prepare_srv_ctx(struct server *srv)
  23. #if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
  24. if (srv->ssl_ctx.ciphersuites &&
  25. - !SSL_CTX_set_cipher_list(srv->ssl_ctx.ctx, srv->ssl_ctx.ciphersuites)) {
  26. + !SSL_CTX_set_ciphersuites(srv->ssl_ctx.ctx, srv->ssl_ctx.ciphersuites)) {
  27. ha_alert("Proxy '%s', server '%s' [%s:%d] : unable to set TLS 1.3 cipher suites to '%s'.\n",
  28. curproxy->id, srv->id,
  29. srv->conf.file, srv->conf.line, srv->ssl_ctx.ciphersuites);