Does the Mobile Edition support SSL?
In testing it, I'm unable to assign an SSL option to the connection.
SSL on Mobile Edition
dotConnnect for PostgreSQL Mobile supports SSL. Please specify the problem you have encountered. Try using the latest 4.55.39.2 version. Here is a sample connection string for the application which is deployed to mobile device (or emulator) to the root folder with the following files Devart.Data.PostgreSql.dll, client.crt, client.key, and root.crt:
Code: Select all
User Id=postgres;Password=postgres;Host=alexsh;Database=postgres;Persist Security Info=True;Schema=public;SSLMode=Require;SSL CA Cert=file://\root.crt;SSL Cert=file://\client.crt;SSL Key=file://\client.key;
Here's my code:
Thanks!
Here's the relevant part of the Stack Trace:PgSqlConnection cnn = new PgSqlConnection("User Id=" + user + ";Password=" + password + ";Host=myIp;Database=myDatabase;SSLMode=Require;");
cnn.Open();
cnn.Close();
I'm only trying to use an encrypted connection, not verify both sides of the connection.at Devart.Security.SSL.o.ab(ap A_0)
at Devart.Security.SSL.ao.k(ap A_0)
at Devart.Common.az.z(Boolean A_0)
at Devart.Common.az.aa(Boolean A_0)
at Devart.Data.PostgreSql.b.y(a A_0)
at Devart.Data.PostgreSql.b..ctor(String A_0, Int32 A_1, Encoding A_2, Int32 A_3, a A_4, ProxyOptions A_5)
at Devart.Data.PostgreSql.b..ctor(String A_0, Int32 A_1, Int32 A_2, a A_3, ProxyOptions A_4)
at Devart.Data.PostgreSql.f.ab()
at Devart.Data.PostgreSql.f.ap()
at Devart.Data.PostgreSql.f.q()
at Devart.Common.DbConnectionInternal.ax()
at Devart.Common.DbConnectionFactory.k(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.PostgreSql.PgSqlConnection.Open()
Thanks!
Please make sure your PostgreSQL server is configured to establish SSL connections. For this, execute SHOW SSL. If the result is off, please refer to the PostgreSQL documentation topic Secure TCP/IP Connections with SSL. If the result of this query is on, make sure the data folder of your PostgreSQL server installation contains the server.crt and server.key files but there is no root.crt in that folder (remove the root.crt file from the data folder).