Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivxSc-0004kn-OL for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jan 2020 06:01:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ivxSa-0007lA-JX for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jan 2020 06:01:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivxSY-0007l2-L7 for pgsql-hackers@lists.postgresql.org; Mon, 27 Jan 2020 06:01:20 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ivxSU-0001xX-Hy for pgsql-hackers@lists.postgresql.org; Mon, 27 Jan 2020 06:01:18 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AB8A0220B5; Mon, 27 Jan 2020 01:01:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 27 Jan 2020 01:01:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=3RAkkOVWeO3F1QM26dO7DrwlILl /udu+xiC/UscnvQM=; b=bMBKxvoGo/PKeb5wxyVxVKnozdz3/84qDyqGyCoMuzv j/te09AZXXI5QxBpIeUfVOQ5F/kfkalBe23OMlYFgS35d+XK42IN8ncawVeNLmgM EztgThKcFHP5DkW2amAw8egs8vfWsSfSfPTQ8DAvtkV94xI408iA3CwiA6erKXjR 6McmRzDIqlhxY0JCObaNSrdkXwFx5JPruAf3N8ERfC6h1DsXiSTJ/PnOrH0meMN2 kuO4hz1zQ4Bv9PfoukXrnS+BeJzab7nXTLJcBP8qXQWbojia4+I7k2amR2AFiNX7 xZnc7BlbZV4fxesL9zmiAkaz/JToQa86RxEJEPobjWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=3RAkkO VWeO3F1QM26dO7DrwlILl/udu+xiC/UscnvQM=; b=NzneT7+P3alfSYxxgFojtB haA/0WjJgGEEpAMdW/NjHGtH6CLd3K4YWEwTlkiBKRieboBFn/nN21ZTdRSutjer T+6DFevRKe+/kT4jWH3bzUxGGVtanyb6SFspreSq1+STXnKdEWs+eSZ63CnjBK8T qlsq4xX2myJHb5VUxzfmy/7W9pXVRmR2McrYVAsdnNgASNev4yGAxABOzaQN7MeZ AJLgr/ZP/NCWgbLf1ji8RTiXvuQhcZ255V3SK2gs+wWMJ9YgXekQbD3PdF5dwfpv ihF+rfuak3fk/064GmRkZ3vbfgOLYhCl9Lz0HC1H3opa2SzSyN4lrwpUWATGXgaQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfedugdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddukedtrddukeehnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesph grqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id F2BCA306938B; Mon, 27 Jan 2020 01:01:10 -0500 (EST) Date: Mon, 27 Jan 2020 15:01:08 +0900 From: Michael Paquier To: Daniel Gustafsson Cc: Tom Lane , cary huang , pgsql-hackers@lists.postgresql.org Subject: Re: Setting min/max TLS protocol in clientside libpq Message-ID: <20200127060108.GD4913@paquier.xyz> References: <6267.1579013367@sss.pgh.pa.us> <2A687774-33FD-49A2-970B-4DD3BEA4A2FE@yesql.se> <20200115055809.GI2243@paquier.xyz> <20200116032233.GB3117@paquier.xyz> <20200117010954.GC2127@paquier.xyz> <20200117023835.GE2127@paquier.xyz> <6C5323F3-60C6-4C2A-B0D9-2816B08528D1@yesql.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2qXFWqzzG3v1+95a" Content-Disposition: inline In-Reply-To: <6C5323F3-60C6-4C2A-B0D9-2816B08528D1@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --2qXFWqzzG3v1+95a Content-Type: multipart/mixed; boundary="Hf61M2y+wYpnELGG" Content-Disposition: inline --Hf61M2y+wYpnELGG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 24, 2020 at 12:19:31PM +0100, Daniel Gustafsson wrote: > Attached is a v5 of the patch which hopefully address all the comments raised, > sorry for the delay. Thanks for the new version. psql: error: could not connect to server: invalid or unsupported maximum protocol version specified: TLSv1.3 Running the regression tests with OpenSSL 1.0.1, 1.0.2 or 1.1.0 fails, because TLSv1.3 (TLS1_3_VERSION) is not supported in those versions. I think that it is better to just rely on TLSv1.2 for all that, knowing that the server default for the minimum bound is v1.2. +test_connect_fails( + $common_connstr, + "sslrootcert=ssl/root+server_ca.crt sslmode=require sslminprotocolversion=TLSv1.3 sslmaxprotocolversion=tlsv1.2", + qr/invalid protocol version range/, + "connect with an incorrect range of TLS protocol versions leaving no versions allowed"); + +test_connect_fails( + $common_connstr, + "sslrootcert=ssl/root+server_ca.crt sslmode=require sslminprotocolversion=TLSv1.3 sslmaxprotocolversion=tlsv1", + qr/invalid protocol version range/, + "connect with an incorrect range of TLS protocol versions leaving no versions allowed"); This is testing twice pattern the same thing, and I am not sure if is is worth bothering about the special case with TLSv1 (using just a comparison with pg_strcasecmp you don't actually need those special checks..). Tests should make sure that a failure happens when an incorrect value is set for sslminprotocolversion and sslmaxprotocolversion. For readability, I think that it is better to consider NULL or empty values for the parameters to be valid. They are actually valid values, because they just get ignored when creating the connection. Adding an assertion within the routine for the protocol range check to make sure that the values are valid makes the code more robust. + {"sslminprotocolversion", "PGSSLMINPROTOCOLVERSION", NULL, NULL, + "SSL-Minimum-Protocol-Version", "", /* sizeof("TLSv1.x") */ 7, + offsetof(struct pg_conn, sslminprotocolversion)}, + + {"sslmaxprotocolversion", "PGSSLMAXPROTOCOLVERSION", NULL, NULL, + "SSL-Maximum-Protocol-Version", "", /* sizeof("TLSv1.x") */ 7, Missing a zero-terminator in the count here. And actually gssencmode is wrong as well.. I'll report that on a different thread. +# Test min/mix protocol versions Typo here. +bool +pq_verify_ssl_protocol_option(const char *protocolversion) [...] +bool +pq_verify_ssl_protocol_range(const char *min, const char *max) Both routines are just used in fe-connect.c to validate the connection parameters, so it is better to keep them static and in fe-connect.c in my opinion. + if (*(min + strlen("TLSv1.")) > *(max + strlen("TLSv1."))) + return false; It is enough to use pg_strcasecmp() here. Hm. I am not sure that having a separate section "Client Protocol Usage" brings much, so I have removed this one, and added an extra sentence for the maximum protocol regarding its value for testing or protocol compatibility. The regression tests of postgres_fdw failed because of the new parameters. One update later, they run fine. So, attached is an updated version of the patch that I have spent a couple of hours polishing. What do you think? -- Michael --Hf61M2y+wYpnELGG Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="libpq_minmaxproto_v6.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-s= ecure-openssl.c index 0cc59f1be1..987ab660cb 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -1274,6 +1274,9 @@ X509_NAME_to_cstring(X509_NAME *name) * version, then we log with the given loglevel and return (if we return) = -1. * If a nonnegative value is returned, subsequent code can assume it's wor= king * with a supported version. + * + * Note: this is rather similar to libpq's routine in fe-secure-openssl.c, + * so make sure to update both routines if changing this one. */ static int ssl_protocol_version_to_openssl(int v, const char *guc_name, int loglevel) diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-co= nnect.c index 80b54bc92b..8498f32f8d 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -320,6 +320,14 @@ static const internalPQconninfoOption PQconninfoOption= s[] =3D { "Require-Peer", "", 10, offsetof(struct pg_conn, requirepeer)}, =20 + {"sslminprotocolversion", "PGSSLMINPROTOCOLVERSION", NULL, NULL, + "SSL-Minimum-Protocol-Version", "", 8, /* sizeof("TLSv1.x") =3D=3D 8 */ + offsetof(struct pg_conn, sslminprotocolversion)}, + + {"sslmaxprotocolversion", "PGSSLMAXPROTOCOLVERSION", NULL, NULL, + "SSL-Maximum-Protocol-Version", "", 8, /* sizeof("TLSv1.x") =3D=3D 8 */ + offsetof(struct pg_conn, sslmaxprotocolversion)}, + /* * As with SSL, all GSS options are exposed even in builds that don't have * support. @@ -426,6 +434,8 @@ static char *passwordFromFile(const char *hostname, con= st char *port, const char const char *username, const char *pgpassfile); static void pgpassfileWarning(PGconn *conn); static void default_threadlock(int acquire); +static bool sslVerifyProtocolVersion(const char *version); +static bool sslVerifyProtocolRange(const char *min, const char *max); =20 =20 /* global variable because fe-auth.c needs to access it */ @@ -1285,6 +1295,40 @@ connectOptions2(PGconn *conn) goto oom_error; } =20 + /* + * Validate TLS protocol versions for sslminprotocolversion and + * sslmaxprotocolversion. + */ + if (!sslVerifyProtocolVersion(conn->sslminprotocolversion)) + { + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("invalid sslminprotocolversion value: \"%s\"\n"), + conn->sslminprotocolversion); + return false; + } + if (!sslVerifyProtocolVersion(conn->sslmaxprotocolversion)) + { + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("invalid sslmaxprotocolversion value: \"%s\"\n"), + conn->sslmaxprotocolversion); + return false; + } + + /* + * Check if the range of SSL protocols defined is correct. This is done + * at this early step because this is independent of the SSL + * implementation used, and this avoids unnecessary cycles with an + * already-built SSL context when the connection is being established, as + * it would be doomed anyway. + */ + if (!sslVerifyProtocolRange(conn->sslminprotocolversion, + conn->sslmaxprotocolversion)) + { + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("invalid SSL protocol version range")); + return false; + } + /* * validate gssencmode option */ @@ -4001,6 +4045,10 @@ freePGconn(PGconn *conn) free(conn->sslcompression); if (conn->requirepeer) free(conn->requirepeer); + if (conn->sslminprotocolversion) + free(conn->sslminprotocolversion); + if (conn->sslmaxprotocolversion) + free(conn->sslmaxprotocolversion); if (conn->gssencmode) free(conn->gssencmode); if (conn->krbsrvname) @@ -7031,6 +7079,71 @@ pgpassfileWarning(PGconn *conn) } } =20 +/* + * Check if the SSL procotol value given in input is valid or not. + * This is used as a sanity check routine for the connection parameters + * sslminprotocolversion and sslmaxprotocolversion. + */ +static bool +sslVerifyProtocolVersion(const char *version) +{ + /* + * An empty string and a NULL value are considered valid as it is + * equivalent to ignoring the parameter. + */ + if (!version || strlen(version) =3D=3D 0) + return true; + + if (pg_strcasecmp(version, "TLSv1") =3D=3D 0 || + pg_strcasecmp(version, "TLSv1.1") =3D=3D 0 || + pg_strcasecmp(version, "TLSv1.2") =3D=3D 0 || + pg_strcasecmp(version, "TLSv1.3") =3D=3D 0) + return true; + + /* anything else is wrong */ + return false; +} + + +/* + * Ensure that the SSL protocol range given in input is correct. The check + * is performed on the input string to keep it TLS backend agnostic. Input + * to this function is expected verified with sslVerifyProtocolVersion(). + */ +static bool +sslVerifyProtocolRange(const char *min, const char *max) +{ + Assert(sslVerifyProtocolVersion(min) && + sslVerifyProtocolVersion(max)); + + /* If at least one of the bounds is not set, the range is valid */ + if (min =3D=3D NULL || max =3D=3D NULL || strlen(min) =3D=3D 0 || strlen(= max) =3D=3D 0) + return true; + + /* + * If the minimum version is the lowest one we accept, then all options + * for the maximum are valid. + */ + if (pg_strcasecmp(min, "TLSv1") =3D=3D 0) + return true; + + /* + * The minimum bound is valid, and cannot be TLSv1, so using TLSv1 for the + * maximum is incorrect. + */ + if (pg_strcasecmp(max, "TLSv1") =3D=3D 0) + return false; + + /* + * At this point we know that we have a mix of TLSv1.1 through 1.3 + * versions. + */ + if (pg_strcasecmp(min, max) > 0) + return false; + + return true; +} + =20 /* * Obtain user's home directory, return in given buffer diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libp= q/fe-secure-openssl.c index 0e84fc8ac6..acf2addcc9 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -30,6 +30,7 @@ #include "fe-auth.h" #include "fe-secure-common.h" #include "libpq-int.h" +#include "common/openssl.h" =20 #ifdef WIN32 #include "win32.h" @@ -95,6 +96,7 @@ static long win32_ssl_create_mutex =3D 0; #endif /* ENABLE_THREAD_SAFETY */ =20 static PQsslKeyPassHook_type PQsslKeyPassHook =3D NULL; +static int ssl_protocol_version_to_openssl(const char *protocol); =20 /* ------------------------------------------------------------ */ /* Procedures common to all secure sessions */ @@ -787,6 +789,8 @@ initialize_SSL(PGconn *conn) bool have_cert; bool have_rootcert; EVP_PKEY *pkey =3D NULL; + int ssl_max_ver; + int ssl_min_ver; =20 /* * We'll need the home directory if any of the relevant parameters are @@ -843,6 +847,54 @@ initialize_SSL(PGconn *conn) /* Disable old protocol versions */ SSL_CTX_set_options(SSL_context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); =20 + if (conn->sslminprotocolversion && + strlen(conn->sslminprotocolversion) !=3D 0) + { + ssl_min_ver =3D ssl_protocol_version_to_openssl(conn->sslminprotocolvers= ion); + + if (ssl_min_ver =3D=3D -1) + { + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("invalid value \"%s\" for minimum version of SSL pr= otocol\n"), + conn->sslminprotocolversion); + return -1; + } + + if (!SSL_CTX_set_min_proto_version(SSL_context, ssl_min_ver)) + { + char *err =3D SSLerrmessage(ERR_get_error()); + + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("could not set minimum version of SSL protocol: %s\= n"), + err); + return -1; + } + } + + if (conn->sslmaxprotocolversion && + strlen(conn->sslmaxprotocolversion) !=3D 0) + { + ssl_max_ver =3D ssl_protocol_version_to_openssl(conn->sslmaxprotocolvers= ion); + + if (ssl_max_ver =3D=3D -1) + { + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("invalid value \"%s\" for maximum version of SSL pr= otocol\n"), + conn->sslmaxprotocolversion); + return -1; + } + + if (!SSL_CTX_set_max_proto_version(SSL_context, ssl_max_ver)) + { + char *err =3D SSLerrmessage(ERR_get_error()); + + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("could not set maximum version of SSL protocol: %s\= n"), + err); + return -1; + } + } + /* * Disable OpenSSL's moving-write-buffer sanity check, because it causes * unnecessary failures in nonblocking send cases. @@ -1659,3 +1711,37 @@ PQssl_passwd_cb(char *buf, int size, int rwflag, voi= d *userdata) else return PQdefaultSSLKeyPassHook(buf, size, conn); } + +/* + * Convert TLS protocol version string to OpenSSL values + * + * If a version is passed that is not supported by the current OpenSSL ver= sion, + * then we return -1. If a non-negative value is returned, subsequent code= can + * assume it is working with a supported version. + * + * Note: this is rather similar to the backend routine in be-secure-openss= l.c, + * so make sure to update both routines if changing this one. + */ +static int +ssl_protocol_version_to_openssl(const char *protocol) +{ + if (pg_strcasecmp("TLSv1", protocol) =3D=3D 0) + return TLS1_VERSION; + +#ifdef TLS1_1_VERSION + if (pg_strcasecmp("TLSv1.1", protocol) =3D=3D 0) + return TLS1_1_VERSION; +#endif + +#ifdef TLS1_2_VERSION + if (pg_strcasecmp("TLSv1.2", protocol) =3D=3D 0) + return TLS1_2_VERSION; +#endif + +#ifdef TLS1_3_VERSION + if (pg_strcasecmp("TLSv1.3", protocol) =3D=3D 0) + return TLS1_3_VERSION; +#endif + + return -1; +} diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-= int.h index 79bc3780ff..72931e6019 100644 --- a/src/interfaces/libpq/libpq-int.h +++ b/src/interfaces/libpq/libpq-int.h @@ -367,6 +367,8 @@ struct pg_conn char *krbsrvname; /* Kerberos service name */ char *gsslib; /* What GSS library to use ("gssapi" or * "sspi") */ + char *sslminprotocolversion; /* minimum TLS protocol version */ + char *sslmaxprotocolversion; /* maximum TLS protocol version */ =20 /* Type of connection to make. Possible values: any, read-write. */ char *target_session_attrs; diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 7b18402cf6..6b57b16fab 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -13,7 +13,7 @@ use SSLServer; =20 if ($ENV{with_openssl} eq 'yes') { - plan tests =3D> 86; + plan tests =3D> 93; } else { @@ -356,6 +356,27 @@ command_like( ^\d+,t,TLSv[\d.]+,[\w-]+,\d+,f,_null_,_null_,_null_\r?$}mx, 'pg_stat_ssl view without client certificate'); =20 +# Test min/max SSL protocol versions. +test_connect_ok( + $common_connstr, + "sslrootcert=3Dssl/root+server_ca.crt sslmode=3Drequire sslminprotocolver= sion=3DTLSv1.2 sslmaxprotocolversion=3DTLSv1.2", + "connection success with correct range of TLS protocol versions"); +test_connect_fails( + $common_connstr, + "sslrootcert=3Dssl/root+server_ca.crt sslmode=3Drequire sslminprotocolver= sion=3DTLSv1.2 sslmaxprotocolversion=3DTLSv1.1", + qr/invalid SSL protocol version range/, + "connection failure with incorrect range of TLS protocol versions"); +test_connect_fails( + $common_connstr, + "sslrootcert=3Dssl/root+server_ca.crt sslmode=3Drequire sslminprotocolver= sion=3Dincorrect_tls", + qr/invalid sslminprotocolversion value/, + "connection failure with an incorrect SSL protocol minimum bound"); +test_connect_fails( + $common_connstr, + "sslrootcert=3Dssl/root+server_ca.crt sslmode=3Drequire sslmaxprotocolver= sion=3Dincorrect_tls", + qr/invalid sslmaxprotocolversion value/, + "connection failure with an incorrect SSL protocol maximum bound"); + ### Server-side tests. ### ### Test certificate authorization. diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index fcbf7fafbd..9a24c19ccb 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1732,6 +1732,40 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname =20 + + sslminprotocolversion + + + This parameter specifies the minimum SSL/TLS protocol version to a= llow + for the connection. Valid values are TLSv1, + TLSv1.1, TLSv1.2 and + TLSv1.3. The supported protocols depend on the + version of OpenSSL used, older versions + not supporting the most modern protocol versions. If not set, this + parameter is ignored and the connection will use the minimum bound + defined by the backend. + + + + + + sslmaxprotocolversion + + + This parameter specifies the maximum SSL/TLS protocol version to a= llow + for the connection. Valid values are TLSv1, + TLSv1.1, TLSv1.2 and + TLSv1.3. The supported protocols depend on the + version of OpenSSL used, older versions + not supporting the most modern protocol versions. If not set, this + parameter is ignored and the connection will use the maximum bound + defined by the backend, if set. Setting the maximum protocol versi= on + is mainly useful for testing or if some component has issues worki= ng + with a newer protocol. + + + + krbsrvname @@ -7120,6 +7154,26 @@ myEventProc(PGEventId evtId, void *evtInfo, void *pa= ssThrough) =20 + + + + PGSSLMINPROTOCOLVERSION + + PGSSLMINPROTOCOLVERSION behaves the same as the connection paramet= er. + + + + + + + PGSSLMAXPROTOCOLVERSION + + PGSSLMAXPROTOCOLVERSION behaves the same as the connection paramet= er. + + + diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postg= res_fdw/expected/postgres_fdw.out index ebe7bfde23..62c2697920 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -8898,7 +8898,7 @@ DO $d$ END; $d$; ERROR: invalid option "password" -HINT: Valid options in this context are: service, passfile, channel_bindi= ng, connect_timeout, dbname, host, hostaddr, port, options, application_nam= e, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_= user_timeout, sslmode, sslcompression, sslcert, sslkey, sslrootcert, sslcrl= , requirepeer, gssencmode, krbsrvname, gsslib, target_session_attrs, use_re= mote_estimate, fdw_startup_cost, fdw_tuple_cost, extensions, updatable, fet= ch_size +HINT: Valid options in this context are: service, passfile, channel_bindi= ng, connect_timeout, dbname, host, hostaddr, port, options, application_nam= e, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_= user_timeout, sslmode, sslcompression, sslcert, sslkey, sslrootcert, sslcrl= , requirepeer, sslminprotocolversion, sslmaxprotocolversion, gssencmode, kr= bsrvname, gsslib, target_session_attrs, use_remote_estimate, fdw_startup_co= st, fdw_tuple_cost, extensions, updatable, fetch_size CONTEXT: SQL statement "ALTER SERVER loopback_nopw OPTIONS (ADD password = 'dummypw')" PL/pgSQL function inline_code_block line 3 at EXECUTE -- If we add a password for our user mapping instead, we should get a diff= erent --Hf61M2y+wYpnELGG-- --2qXFWqzzG3v1+95a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIyBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4ufKQACgkQnvQgOdby QH3qRQ/48BoNNxtvuS0PWbkREEaeRlSZCRrNG+tfSDNUkSTlu2rNs8YB0unBczN3 6Abaqrr75nlos7wN/+scVupY8+pyxHI+7NaqKdp0jNkqvUey6aVjSsbjjgUFMIa2 WX7fsofqTmZWqfRKoSclRKzRXAtJiaNfIfFA3Evz2Gf/U91l5cRclXxfMb6Zpiuh SHBZpKGBOM3twSZ02bRK7vrz0+FHIoTT8LErUhT+37rWcHLSBp99OnYRoMcZk440 /B07lewZppRfFYc7mOlD/e+aK6odLPODyVsEUG3gHHGLL3yfqbUPXfz+Jzn/AGjV Hh4NHECkS87nfzW8T5xWWvj/Xh/8DtK+01rdsoILoVQeAyhfVVaCHIhCusdCp1XN pRqow6UkkKdheP91vrVwRJJEOmMMH2cog0cvjssYHgeAC1r4KmXvHcS1a3N+PMjT XS9e97bfFZ5LYhH+XrYoU7rRNPnRFDx/GJftKA+t3b42XIoqn5OAK9xsGAsKAChw HvaoKC+WSuuJQUdSNb3ZTQil8UvjiRqrH/XsVOMnLjP9xe2nkT2QRr7u0TUpK+HA HH06fdxvLjaHUJWXL3F7aB5abTl78N9vCSQToLFZdZ5viXGaHNCa9K9atwjq2RN0 zcax/Ys394CeX/4YM9/fX6D+OIwq7CHv6QpQgDY3F3mcoIJT9A== =G9sU -----END PGP SIGNATURE----- --2qXFWqzzG3v1+95a--