Skip to main content
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
deleted 2 characters in body
Source Link
alasarr
  • 461
  • 4
  • 14

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):

enter image description here QGIS configuration (doesn't work):

This is the connection form. I use a PKI stored identify certificate

enter image description here

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).

enter image description here

The root certificate is also there:

enter image description here

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

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):

enter image description here QGIS configuration (doesn't work):

This is the connection form. I use a PKI stored identify certificate

enter image description here

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).

enter image description here

The root certificate is also there:

enter image description here

Server error log:

"[214]: [1-1] db=[unknown],user=[unknown] LOG:  could not accept SSL connection: TLSV1_ALERT_UNKNOWN_CA" 

It looks the server certificate is not sent

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):

enter image description here QGIS configuration (doesn't work):

This is the connection form. I use a PKI stored identify certificate

enter image description here

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).

enter image description here

The root certificate is also there:

enter image description here

Server error log:

"[214]: [1-1] db=[unknown],user=[unknown] LOG:  could not accept SSL connection: TLSV1_ALERT_UNKNOWN_CA" 

It looks the root certificate is not sent

Tweeted twitter.com/StackGIS/status/1219409386751262726
edited title
Link
alasarr
  • 461
  • 4
  • 14

QGIS connectconnection to PostGIS via SSL

Source Link
alasarr
  • 461
  • 4
  • 14
Loading