Hello,
Maybe there a bug in current mysql 3.0.0 rc3 ssl code.
When trying to connect using ssl to a mysql server it seems connection
doesn't send username when calling connect function.
here's code fragment i use
------------
// Get database access parameters from command line
const char *db = 0, *server = 0, *user = 0, *pass = "";
if (!parse_command_line(argc, argv, &db, &server, &user, &pass)) {
return 1;
}
//SSL Vorbereiten
std::string pKey = "c:\\test\\OpenSSL\\bin\\mycerts\\client-key.pem";
std::string pCert = "c:\\test\\OpenSSL\\bin\\mycerts\\client-cert.pem";
std::string pCA = "c:\\test\\OpenSSL\\bin\\mycerts\\ca-cert.pem";
std::string pCApath = "c:\\test\\OpenSSL\\bin\\mycerts\\";
std::string pCipher = "ALL";
mysqlpp::SslOption opSSL(pKey.c_str(), pCert.c_str(), pCA.c_str(),
pCApath.c_str(), pCipher.c_str() );
// Connect to the sample database.
mysqlpp::Connection conn(false);
//SSL Verbinden ...
conn.set_option( &opSSL ); {
if (conn.connect( db, server, user, pass )) {
----
The connect fails with conn.error() reporting a "SSL connection Error".
When sniffing packets it shows username is empty in login Request
From Wireshark :
Username: [Empty]
Without conn.set_option( &opSSL );
Connection works fine.
Maybe one can confirm this bug or show me how to do things right ?
greets
Thomas Werth