mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
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.
This commit is contained in:
parent
988e59f452
commit
17e048603c
@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.59.2.1 2005/11/22 18:23:09 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.59.2.2 2006/05/12 22:44:43 tgl Exp $
|
||||
*
|
||||
* Since the server static private key ($DataDir/server.key)
|
||||
* will normally be stored unencrypted so that the database
|
||||
@ -525,7 +525,7 @@ load_dh_file(int keylength)
|
||||
/* make sure the DH parameters are usable */
|
||||
if (dh != NULL)
|
||||
{
|
||||
if (DH_check(dh, &codes))
|
||||
if (DH_check(dh, &codes) == 0)
|
||||
{
|
||||
elog(LOG, "DH_check error (%s): %s", fnbuf, SSLerrmessage());
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user