SSL on Mobile Edition

SSL on Mobile Edition

Postby dmr1997 » Mon 17 Aug 2009 16:13

Does the Mobile Edition support SSL?

In testing it, I'm unable to assign an SSL option to the connection.
dmr1997
 
Posts: 3
Joined: Mon 17 Aug 2009 16:08

Postby Shalex » Wed 19 Aug 2009 15:48

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;
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44

Postby dmr1997 » Wed 19 Aug 2009 20:29

Here's my code:
PgSqlConnection cnn = new PgSqlConnection("User Id=" + user + ";Password=" + password + ";Host=myIp;Database=myDatabase;SSLMode=Require;");
cnn.Open();

cnn.Close();


Here's the relevant part of the Stack Trace:
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()


I'm only trying to use an encrypted connection, not verify both sides of the connection.

Thanks!
dmr1997
 
Posts: 3
Joined: Mon 17 Aug 2009 16:08

Postby dmr1997 » Wed 19 Aug 2009 21:32

And I forgot to mention, yes I'm using version 4.55.39.2
dmr1997
 
Posts: 3
Joined: Mon 17 Aug 2009 16:08

Postby Shalex » Thu 20 Aug 2009 13:30

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).
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL