From: Tom Lane Date: Fri, 12 May 2006 22:44:43 +0000 (+0000) Subject: Fix the sense of the test on DH_check()'s return value. This was preventing X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=8bc0bec2d3d954a368b82b8c36bc0532fced8a10;p=users%2Fbernd%2Fpostgres.git 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. --- diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 8539e9a97a..d59e7bcfee 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -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;