postgresql-dart icon indicating copy to clipboard operation
postgresql-dart copied to clipboard

Connection with SSL certificates

Open kaede28 opened this issue 7 years ago • 4 comments

Is it possible to use SSL certificates to connect to the database?

If so, how can I do it?

kaede28 avatar Oct 07 '18 12:10 kaede28

Client side certificates? If server side, does the useSSL flag to the constructor work?

itsjoeconway avatar Oct 08 '18 00:10 itsjoeconway

Thanks for replying. Yes, client side certificates. Em dom, 7 de out de 2018 às 21:31, Joe Conway [email protected] escreveu:

Client side certificates? If server side, does the useSSL flag to the constructor work?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stablekernel/postgresql-dart/issues/63#issuecomment-427699969, or mute the thread https://github.com/notifications/unsubscribe-auth/AGSrKm5JNLyDGko4sg37KMGVa-xzyenwks5uipzEgaJpZM4XL1IA .

kaede28 avatar Oct 08 '18 14:10 kaede28

Try this.

var connection = PostgreSQLConnection("localhost", 5432, 
"dart_test", username: "dart", password: "dart", useSSL: true);
await connection.open();

By default, the useSSL is false.

NandanSatheesh avatar Dec 10 '19 07:12 NandanSatheesh

I still get error i.e. asking for certificate. How from dart/flutter app do i point to the correct certificates ?

mars000 avatar Jul 09 '21 14:07 mars000