views:

732

answers:

1

I want to connect a C# .NET application to a PostgreSQL database, using TLS with client and server authentication: in other words, if the certificate from the client can not be verified against the certificate of the server, the client should get access denied, and if the client can not verify the certificate of the server, the client should immediately abort connecting.

I tried this using Npgsql 1.0, but I can not find any way in Npgsql to specify the client certificate that should be used for the connection.

I did manage to get server certificate verification on the client working, and I also did get all the verification working using the commandline db admin tool psql, but this did not help me further in getting it to work with Npgsql.

So, how would I connect my .NET app using TLS client & server authentication to a PostgreSQL database?

Is there maybe a newer/other data provider that does support this?

Is there actually anyone who did get this to work one way or another?

+1  A: 

Try version 2.0 RC2 - it's pretty stable.

Artem Tikhomirov
Ok, once I got my test certificate generation infrastructure working again, I'll see if 2.0 RC2 is any better at it.
Tobi