Cannot load CA certificate.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 1
Joined: Mon 26 Nov 2012 12:47

Cannot load CA certificate.

Post by spanco » Mon 26 Nov 2012 12:56


i have just downloaded the mobile trial version and started with connecting to
my mysql server without ssl and it worked great. Then i inserted the ssloptions
and it says "Cannot load CA certificate.".

string vSource2 = "User Id=user; Password=pass; Host=; Database=db; Protocol=SSL;";

mycon = new MySqlConnection(vSource2);
mycon.SslOptions.CACert = "cacert.pem";
mycon.SslOptions.Cert = "client-cert.pem";
mycon.SslOptions.Key = "client-key.pem";

i use the certificates with another connector the odbc/NET and it works so its nothing wrong with them.

i have tried all the diffrent paths file://cacert.pem and with the application.startuppath.

check with File.exits("cacert.pem") and its there.

whats wrong? am greatful for all the help i can get!

Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: Cannot load CA certificate.

Post by Pinturiccio » Wed 28 Nov 2012 16:01

We can reproduce the issue only if we set a wrong path in the mycon.SslOptions.CACert property. If you get "Cannot load CA certificate." exception, that means that you have a correct path for

Code: Select all

mycon.SslOptions.Cert = "client-cert.pem";
mycon.SslOptions.Key = "client-key.pem";
Please check one more time, whether the cacert.pem file is in the root of your device.

Please also provide the inner exception.

Post Reply