Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f4051e3

Browse files
committed
Fix advertised dispsize for libpq's sslmode connection parameter.
"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.
1 parent 0294023 commit f4051e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interfaces/libpq/fe-connect.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
251251
* to exclude them since none of them are mandatory.
252252
*/
253253
{"sslmode", "PGSSLMODE", DefaultSSLMode, NULL,
254-
"SSL-Mode", "", 8, /* sizeof("disable") == 8 */
254+
"SSL-Mode", "", 12, /* sizeof("verify-full") == 12 */
255255
offsetof(struct pg_conn, sslmode)},
256256

257257
{"sslcompression", "PGSSLCOMPRESSION", "1", NULL,

0 commit comments

Comments
 (0)