Skip to content

Commit f352f91

Browse files
committed
Remove duplicate setting of SSL_OP_SINGLE_DH_USE option.
Commit c0a15e0 moved the setting of OpenSSL's SSL_OP_SINGLE_DH_USE option into a new subroutine initialize_dh(), but forgot to remove it from where it was. SSL_CTX_set_options() is a trivial function, amounting indeed to just "ctx->options |= op", hence there's no reason to contort the code or break separation of concerns to avoid calling it twice. So separating the DH setup from disabling of old protocol versions is a good change, but we need to finish the job. Noted while poking into the question of SSL session tickets.
1 parent 41cefbb commit f352f91

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/backend/libpq/be-secure-openssl.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,7 @@ be_tls_init(bool isServerStart)
286286
}
287287

288288
/* disallow SSL v2/v3 */
289-
SSL_CTX_set_options(context,
290-
SSL_OP_SINGLE_DH_USE |
291-
SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
289+
SSL_CTX_set_options(context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
292290

293291
/* set up ephemeral DH and ECDH keys */
294292
if (!initialize_dh(context, isServerStart))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy