Skip to content

Commit 8105300

Browse files
committed
Disallow setting ssl = on if SSL is not compiled in.
1 parent edafb4f commit 8105300

File tree

1 file changed

+15
-2
lines changed
  • src/backend/utils/misc

1 file changed

+15
-2
lines changed

src/backend/utils/misc/guc.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.304 2005/12/28 16:38:38 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.305 2005/12/30 00:13:50 petere Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -130,6 +130,7 @@ static const char *show_num_temp_buffers(void);
130130
static bool assign_phony_autocommit(bool newval, bool doit, GucSource source);
131131
static const char *assign_custom_variable_classes(const char *newval, bool doit,
132132
GucSource source);
133+
static bool assign_ssl(bool newval, bool doit, GucSource source);
133134
static bool assign_stage_log_stats(bool newval, bool doit, GucSource source);
134135
static bool assign_log_stats(bool newval, bool doit, GucSource source);
135136
static bool assign_transaction_read_only(bool newval, bool doit, GucSource source);
@@ -496,7 +497,7 @@ static struct config_bool ConfigureNamesBool[] =
496497
NULL
497498
},
498499
&EnableSSL,
499-
false, NULL, NULL
500+
false, assign_ssl, NULL
500501
},
501502
{
502503
{"fsync", PGC_SIGHUP, WAL_SETTINGS,
@@ -5864,6 +5865,18 @@ assign_custom_variable_classes(const char *newval, bool doit, GucSource source)
58645865
return newval;
58655866
}
58665867

5868+
static bool
5869+
assign_ssl(bool newval, bool doit, GucSource source)
5870+
{
5871+
#ifndef USE_SSL
5872+
if (newval)
5873+
ereport(ERROR,
5874+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
5875+
errmsg("SSL is not supported by this build")));
5876+
#endif
5877+
return true;
5878+
}
5879+
58675880
static bool
58685881
assign_stage_log_stats(bool newval, bool doit, GucSource source)
58695882
{

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