Skip to content

Commit 91d568e

Browse files
committed
Fix the sense of the test on DH_check()'s return value. This was preventing
custom-generated DH parameters from actually being used by the server. Found by Michael Fuhr.
1 parent 2246e31 commit 91d568e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/libpq/be-secure.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.69 2006/05/06 02:24:39 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.70 2006/05/12 22:44:36 tgl Exp $
1515
*
1616
* Since the server static private key ($DataDir/server.key)
1717
* will normally be stored unencrypted so that the database
@@ -524,7 +524,7 @@ load_dh_file(int keylength)
524524
/* make sure the DH parameters are usable */
525525
if (dh != NULL)
526526
{
527-
if (DH_check(dh, &codes))
527+
if (DH_check(dh, &codes) == 0)
528528
{
529529
elog(LOG, "DH_check error (%s): %s", fnbuf, SSLerrmessage());
530530
return NULL;

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