Bug #60600 | SSL-mode does not work with compact version of Connector/NET (mysql.data.cf.dll) | ||
---|---|---|---|
Submitted: | 23 Mar 2011 10:16 | Modified: | 2 Aug 2011 21:20 |
Reporter: | Maxim Malencoff | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S4 (Feature request) |
Version: | 6.4.3 | OS: | Windows (Windows CE 5, Windows Mobile 6) |
Assigned to: | Julio Casal | CPU Architecture: | Any |
Tags: | Compact Framework, encryption, pfx, SSL, Windows CE |
[23 Mar 2011 10:16]
Maxim Malencoff
[30 Mar 2011 9:26]
Bogdan Degtyariov
Hi Maxim, Thank you for reporting the problem in MySQL Connector/NET driver. Does the problem occur when you run the application in the emulator or in the real device? Thanks.
[30 Mar 2011 9:44]
Maxim Malencoff
Hello, Bogdan! Yes, I run my test application on real device (HTC HD) and on emulators (Windows CE 5, Windows Mobile 2003, Windows Mobile 5) too. In any case error was the same. P.S. Sorry for my bad english...
[12 Apr 2011 8:29]
Bogdan Degtyariov
Maxim, Sorry for the delay. Finally, I was able to repeat the problem. Setting the status to Verified. Does your Windows Mobile application use imported certificate from certificate store or the certificate from file? I imported the pfx file into the store and modified my connection string accordingly: con.ConnectionString = "server=10.0.0.1;database=test;user id=ssluser;pwd=**********;Certificate Store Location=CurrentUser;SSL Mode=Required;"; After trying to connect to MySQL server the number of aborted_connects in the server status increased. Here is the error and the stack trace: error "Bad handshake at MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.AuthenticateNew() at MySql.Data.MySqlClient.NativeDriver.Authenticate() at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at bug60600.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam) at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain) at System.Windows.Forms.Application.Run(Form fm) at bug60600.Program.Main()" string
[12 Apr 2011 9:01]
Bogdan Degtyariov
I have just noticed that SSL-related functions are not building for CF because they are using precompiler directives such as #if !CF. So, this report is rather a feature request than a bug.
[12 Apr 2011 9:08]
Bogdan Degtyariov
MySQL.Data.CF is using X509CertificateCollection and few other classes that exist only in CF 3.5. So, it is theoretically possible to remove #if !CF directives and have the SSL support if CF 3.5 is installed on the target device/emulator.
[13 Apr 2011 13:35]
Maxim Malencoff
Hello, Bogdan! At first, thank you for your replay!!! So, yes, I used both way to define user's certificate (using extern file and using certificate from certificate store). In any case the error was the same: "Bad handshake". For me version of .NET CF it is not so important. And if it will be possible to use SSL-ecription in CF3.5 so, I convert my projects to CF3.5 "Paris is well worth a Mass" (c). :-)
[19 May 2011 20:28]
Julio Casal
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. Fixed in 6.2.5, 6.3.7 and 6.4.1+ If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html
[2 Aug 2011 18:32]
Maxim Malencoff
Is it possible to include mysql.data.cf.dll file into latest connectors installation? I'v just download the latest Connector/Net 6.4.3... there is no mysql.data.cf.dll at all! No for CF 2.0 no for CF 3.5... Not at all. Sorry, am I wrong? Or, my be now I always supposed to build CF vesion by myself?
[2 Aug 2011 18:34]
Maxim Malencoff
Is it possible to include mysql.data.cf.dll file into latest connectors installation? I'v just download the latest Connector/Net 6.4.3... there is no mysql.data.cf.dll at all! No for CF 2.0 no for CF 3.5... Not at all. Sorry, am I wrong? Or, my be now I always supposed to build CF vesion by myself?
[2 Aug 2011 21:20]
Julio Casal
Maxim, please create a new bug for the mysql.data.cf.dll issue for appropriate tracking.