As per links below, PostgreSql supports several ssl mode connections, but its ADO.net driver, npgsql does not support the modes verify-ca and verify-full, which are supported by the its JDBC driver.
Is there any reason for this? Is it possible to use these modes somehow else?
PostgreSql docu https://www.postgresql.org/docs/9.1/libpq-ssl.html
Npgsql driver docu https://www.npgsql.org/doc/connection-string-parameters.html
JDBC driver docu https://jdbc.postgresql.org/documentation/head/ssl-client.html
Npgsql will by default verify the server certificate, so SSL Mode=Require would correspond to libpq's verify-ca or verify-full (the documentation is not entirely clear on that).
From the documentation link in your question:
By default, Npgsql will validate your server's certificate; if you're using a self-signed certificate, this will fail. You can instruct Npgsql to ignore this by specifying
Trust Server Certificate=truein the connection string. To precisely control how the server's certificate is validated, you can registerUserCertificateValidationCallbackonNpgsqlConnection(this works just like on .NET'sSslStream).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With