SSL problem on windows mobile

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
JorEl
Posts: 3
Joined: Mon 16 Mar 2009 13:56

SSL problem on windows mobile

Post by JorEl » Mon 16 Mar 2009 14:06

Hello,

I use MyDirect.NET2 Mobile for database access on a windows mobile 6 device. Now, I tried to make connections secure using SSL instead of plain text. The problem is, that I get always "Lost connection to MySQL server during query" when MySqlConnection.open() is called.

For testing purposes, I downloaded the dotConnect for MySQL 5.00 Professional Trial and created an application using the same sourc code and the same cert files and there it works fine, so the MySQL server setup and the certificates are correct.

I guess the problem is simply, that I don't know what paths should be specified for the cert files on the windows mobile device.

On windows XP, I used

connection.SslOptions.CACert = "file://C:\ca-cert.pem"
connection.SslOptions.Cert = "file:///C:\client-cert.pem"
connection.SslOptions.Key = "file:///C:\client-key.pem"

and it works. But what path should be used on mobile devices since there is no drive C there? It seems that it does not work to use relative paths like ...CACert = "file://\ca-cert.pem" instead.

Thank you for your help.

JorEl
Posts: 3
Joined: Mon 16 Mar 2009 13:56

Post by JorEl » Tue 17 Mar 2009 16:16

I tried some "file://" strings today and found the following:

file://\cacert.pem ==> exception: the pem file could not be found
file://\cacert.pem ==> exception: lost connection...; inner exception: an error occurs while reading from the file
file://\asdf.pem (invalid filename) ==> exception: lost connection...; inner exception: an error occurs while raeding from the file
file://\cacert.pem ==> exception: lost connection...; inner exception: nothing
file://\asdf.pem (invalid filename) ==> exception: an error occurs while reading from the file; inner exception: the file asdf.pem cannot be found.
file://cacert.pem ==> exception: lost connection...; inner exception: nothing

conclusion: file://\cacert.pem seems to be correct for windows mobile devices, a second \ is not required (no inner exception there); file://cacert.pem seems also to be valid. Nevertheless, I still get the "lost connection" exception and I don't find any reason for this.

As I already mentioned, the problem only occurs on the windows mobile device, it works fine on windows XP.

Is there anything else I could try to get this working?

Shalex
Devart Team
Posts: 8083
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 18 Mar 2009 07:50

Thank you for the report. We will investigate the issue and notify you on the first available result.

JorEl
Posts: 3
Joined: Mon 16 Mar 2009 13:56

Post by JorEl » Wed 18 Mar 2009 08:52

Thank you for the report. We will investigate the issue and notify you on the first available result.
Thank you.

Shalex
Devart Team
Posts: 8083
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 24 Apr 2009 13:18

JorEl, we cannot reproduce the SSL problem with the 5.0.26.2 version of dotConnect Mobile for MySQL. Please try using this version. If the problem persists, please tell us:
1) your connection string;
2) is the connection successful without using SSL?

Please notify us about the results.

Post Reply