Postgresql – How to find SSL root cert that made connection to the database in PostgreSQL

postgresqlpostgresql-9.6ssl

When we connect to postgreSQL via ssl-mode=verify-full how will I make sure if the certificate I passed is used while making the connection?

With ssl_is_used(); shows only true or false. Is there any other extension or pg_catalog views that shows the root cert used in making connection to the DB ?

Best Answer

If you use ssl-mode=verify-full, then the server certificate is always tested against the root certificate you pass to the client. So the mere fact that the connection was established successfully is proof that your root certificate has been used.