aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2024-08-19 12:55:11 +0200
committerDaniel Gustafsson <dgustafsson@postgresql.org>2024-08-19 12:55:11 +0200
commit9333174af47560677b62ae5025e4414f860a84a7 (patch)
tree606cbd21d17a9f2c9c615fb8aee203bd25f9d2e3 /src
parent283964ee4dd1b447e3f7a847802ef183f7ac5e74 (diff)
downloadpostgresql-9333174af47560677b62ae5025e4414f860a84a7.tar.gz
postgresql-9333174af47560677b62ae5025e4414f860a84a7.zip
Fix regression in TLS session ticket disabling
Commit 274bbced disabled session tickets for TLSv1.3 on top of the already disabled TLSv1.2 session tickets, but accidentally caused a regression where TLSv1.2 session tickets were incorrectly sent. Fix by unconditionally disabling TLSv1.2 session tickets and only disable TLSv1.3 tickets when the right version of OpenSSL is used. Backpatch to all supported branches. Reported-by: Cameron Vogt <cvogt@automaticcontrols.net> Reported-by: Fire Emerald <fire.github@gmail.com> Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com> Discussion: https://postgr.es/m/DM6PR16MB3145CF62857226F350C710D1AB852@DM6PR16MB3145.namprd16.prod.outlook.com Backpatch-through: v12
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/be-secure-openssl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 4e07ad8cd19..49803b37416 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -263,9 +263,8 @@ be_tls_init(bool isServerStart)
*/
#ifdef HAVE_SSL_CTX_SET_NUM_TICKETS
SSL_CTX_set_num_tickets(context, 0);
-#else
- SSL_CTX_set_options(context, SSL_OP_NO_TICKET);
#endif
+ SSL_CTX_set_options(context, SSL_OP_NO_TICKET);
/* disallow SSL session caching, too */
SSL_CTX_set_session_cache_mode(context, SSL_SESS_CACHE_OFF);