You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Allow to use system CA pool for certificate verification
This adds a new option to libpq's sslrootcert, "system", which will loadthe system trusted CA roots for certificate verification. This is a moreconvenient way to achieve this than pointing to the system CA rootsmanually since the location can differ by installation and be locallyadjusted by env vars in OpenSSL.When sslrootcert is set to system, sslmode is forced to be verify-fullas weaker modes aren't providing much security for public CAs.Changing the location of the system roots by setting environment vars isnot supported by LibreSSL so the tests will use a heuristic to determineif the system being tested is LibreSSL or OpenSSL.The workaround in .cirrus.yml is required to handle a strange interactionbetween homebrew and the openssl@3 formula; hopefully this can be removedin the near future.The original patch was written by Thomas Habets, which was later revivedby Jacob Champion.Author: Jacob Champion <jchampion@timescale.com>Author: Thomas Habets <thomas@habets.se>Reviewed-by: Jelte Fennema <postgres@jeltef.nl>Reviewed-by: Andrew Dunstan <andrew@dunslane.net>Reviewed-by: Magnus Hagander <magnus@hagander.net>Discussion:https://www.postgresql.org/message-id/flat/CA%2BkHd%2BcJwCUxVb-Gj_0ptr3_KZPwi3%2B67vK6HnLFBK9MzuYrLA%40mail.gmail.com
libpq_append_conn_error(conn,"could not get home directory to locate root certificate file\n"
1125
-
"Either provide the file or change sslmode to disable server certificate verification.");
1146
+
"Either provide the file, use the system's trusted roots with sslrootcert=system, or change sslmode to disable server certificate verification.");
1126
1147
else
1127
1148
libpq_append_conn_error(conn,"root certificate file \"%s\" does not exist\n"
1128
-
"Either provide the file or change sslmode to disable server certificate verification.",fnbuf);
1149
+
"Either provide the file, use the system's trusted roots with sslrootcert=system, or change sslmode to disable server certificate verification.",fnbuf);