“HostName not verified error message” on SSL connection in postgresql

后端 未结 3 1816
粉色の甜心
粉色の甜心 2021-02-13 02:11

I created server.crt, server.key and root.crt files on Centos 7 and put the same onto the C:\\Users\\xxxx\\AppData\\Roaming\\postgre

3条回答
  •  有刺的猬
    2021-02-13 02:55

    To use the PostgreSQL JDBC driver without server certificate validation, use

    sslfactory=org.postgresql.ssl.NonValidatingFactory
    

    as connection parameter or as part of the URL as described in the documentation.

    With later versions of the JDBC driver, you have to specify

    sslmode=require
    

    because the default value verify-full means that the client wants to check the certificate and identity of the server.

提交回复
热议问题