I am trying to connect to a PostgreSQL database using SSL. The connection requires that SSLMode is verify-full, but the driver I use (from devart.com), supports Require as the highest level.
Is there a way to accomplish this using the latest driver from devart? If not, is there any other driver that supports this?
I am able to connect using a native ODBC driver, so the connection works for native programs, but need a .Net driver to avoid importing ODBC libraries into my .NET application.
Use nPgSQL with SSL=True;Sslmode=Require;
to enforce SSL. The enum doesn't seem to provide Verify
, though (like in the JDBC driver) it might always verify unless overridden. I don't have it around to test with.
If you need to you can provide a suitable CertificateValidationCallback
to do a certificate verification using C# APIs yourself.
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.