I'm trying to connect to MySQL Server 5.6 using SSL and .pem files similar to the devart docs example code. My app is an asp.net HttpHandler that connects to mysql. I am getting this error:
SSL connection error (2026): Cannot load client private key.
The inner exception says:
Devart.Security.v
Exception: Could not import the private key from the PVK file.
The docs show an example that uses .pem files for the certificates like this:
Code: Select all
myConn.SslOptions.CACert = "file://D:\\Temp\\CA-cert.pem";
myConn.SslOptions.Cert = "file://D:\\Temp\\SSL-client-cert.pem";
myConn.SslOptions.Key = "file://D:\\Temp\\SSL-client-key.pem";
Since the error message says it could not import from a .pvk file- do I need to have the client cert and key in a different format?
I'm using:
Windows 8.1, VS2012, IIS 8.5, dotConnect 8.2.80, MySQL v 5.6, Asp.Net v4.
Here is the stack trace:
Exception Type: Devart.Data.MySql.MySqlException
Exception: SSL connection error (2026):
Cannot load client private key.
Source: Devart.Data.MySql
Stack Trace: at Devart.Data.MySql.s.a(String A_0, String A_1, String A_2, String A_3, Int32 A_4, String A_5, Int32 A_6, SshOptions A_7, SslOptions A_8, ProxyOptions A_9, MySqlHttpOptions A_10, HttpOptions A_11)
at Devart.Data.MySql.MySqlInternalConnection.Connect(MySqlConnection owner, String userId, String password, String host, String database, Int32 port, Int32 connectionTimeout, MySqlProtocol protocol, Boolean compress, Boolean clientInteractive)
at Devart.Data.MySql.ay.a(as A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, as A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.MySql.MySqlConnection.m()
-snip-
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--Inner Exception: Devart.Security.v
Exception: Could not import the private key from the PVK file.
Source: Devart.Data.MySql
Stack Trace: at Devart.Security.ae.a(Byte[] A_0)
at Devart.Security.ae.h(String A_0)
at Devart.Common.ao.a(String A_0, String A_1)