This is a very basic question. i have to import the server.crt on the client side java trustore to connect using jdbc to postgres server secured by ssl. But when i try psql from same machine, it shows the connection as encrypted. How does psql import the server certificate?
psql "postgresql://$POSTGRES_HOST:$PG_PORT/postgres" -U postgres psql (9.6.18) SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help.
Regards, Shankar
You can use a cert to set up encryption, without verifying that the cert was signed by the correct authority. This is what psql does by default if there is no root.crt available and the sslmode is 'require' or below.
JDBC must be configured for, or default to, the equivalent of a sslmode above 'require'.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.