Skip to content

Show sslmode=verify-full, not sslmode=verify-ca, in example config - #2604

Merged
jackc merged 1 commit into
jackc:masterfrom
julianladisch:sslmode-verify-full
Jul 25, 2026
Merged

Show sslmode=verify-full, not sslmode=verify-ca, in example config#2604
jackc merged 1 commit into
jackc:masterfrom
julianladisch:sslmode-verify-full

Conversation

@julianladisch

Copy link
Copy Markdown
Contributor

The example configuration shown in the documentation sets sslmode=verify-ca without setting sslrootcert to a private CA.

That is insecure:
https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS

When the default public CAs are used the client must set sslmode=verify-full to verify that the host name in the server certificate matches the name in the host configuration parameter.

…tion

The example configuration shown in the documentation sets `sslmode=verify-ca`
without setting `sslrootcert` to a private CA.

That is insecure:
https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS

When the default public CAs are used the client must set `sslmode=verify-full`
to verify that the host name in the server certificate matches the name in the
`host` configuration parameter.
@jackc
jackc merged commit 07587b7 into jackc:master Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants