]> granicus.if.org Git - postgresql/commitdiff
Fix advertised dispsize for libpq's sslmode connection parameter.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Mar 2014 01:43:49 +0000 (21:43 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Mar 2014 01:43:49 +0000 (21:43 -0400)
"8" was correct back when "disable" was the longest allowed value, but
since "verify-full" was added, it should be "12".  Given the lack of
complaints, I wouldn't be surprised if nobody is actually using these
values ... but still, if they're in the API, they should be right.

Noticed while pursuing a different problem.  It's been wrong for quite
a long time, so back-patch to all supported branches.

src/interfaces/libpq/fe-connect.c

index bd23e9d143446eec24e60ae97a77fa10f861ed56..448d975200327f46de091239387057845e7d16bf 100644 (file)
@@ -220,7 +220,7 @@ static const PQconninfoOption PQconninfoOptions[] = {
         * to exclude them since none of them are mandatory.
         */
        {"sslmode", "PGSSLMODE", DefaultSSLMode, NULL,
-       "SSL-Mode", "", 8},                     /* sizeof("disable") == 8 */
+       "SSL-Mode", "", 12},                    /* sizeof("verify-full") == 12 */
 
        {"sslcert", "PGSSLCERT", NULL, NULL,
        "SSL-Client-Cert", "", 64},