I want to connect from QGIS to a PostGIS cluster via SSL.
I'm able to connect via SSL from PgAdmin4 and psql using the same certificates but not from QGIS.
QGIS throws the error:
SSL error: certificate verify failed
PSQL (works fine):
psql "sslmode=verify-ca sslrootcert=server-ca.pem \
sslcert=client-cert.pem sslkey=client-key.pem \
hostaddr=XXXXXX \
port=5432 \
user=postgres dbname=postgres"
PGAdmin 4 (works fine):
QGIS configuration (doesn't work):
This is the connection form. I use a PKI stored identify certificate
I create the PKI stored identify certificate as a PKI PEM/DER Certificate Paths. I provide the path of the client's cert (client-cert.pem) and the client's key (client-key.pem).
The root certificate is also there:
Server error log:
"[214]: [1-1] db=[unknown],user=[unknown] LOG: could not accept SSL connection: TLSV1_ALERT_UNKNOWN_CA"
It looks the serverroot certificate is not sent