8 messages in com.mysql.lists.plusplusRe: possible bug in rc3 ?
FromSent OnAttachments
Thomas Werth07 Feb 2008 06:05 
Warren Young07 Feb 2008 14:28 
Thomas Werth07 Feb 2008 22:53 
Warren Young08 Feb 2008 17:05 
Thomas Werth10 Feb 2008 23:08 
Thomas Werth10 Feb 2008 23:30 
Warren Young11 Feb 2008 17:33 
Thomas Werth11 Feb 2008 22:46 
Subject:Re: possible bug in rc3 ?
From:Thomas Werth (thom@vahle.de)
Date:02/07/2008 10:53:17 PM
List:com.mysql.lists.plusplus

See comments inline

You have exceptions turned off and don't show that you're checking for error codes. How do you know that the option was set successfully?

If you get false back from set_option(), you should turn exceptions on and catch the resulting BadOption exception, as it will tell you more about what went wrong.

All code is surronded by try block ending with catch ( std::exception &e ) { cerr << e.what(); }

It's incorrect to pass options allocated on the stack. Connection (DBDriver, actually) needs to control the lifetime of these objects. You want to say:

conn.set_option(new SslOption(...));

changed this part to if ( !conn.set_option( new mysqlpp::SslOption (pKey.c_str(), pCert.c_str(), pCA.c_str(), pCApath.c_str(), pCipher.c_str() ) ) ) { cerr << "SSL option failed: " << endl; return 1; }

still connect raises exception SSL connection error. I'll try 2.x Version of mysqlpp as soon as possible. For additional info i used ssl key setup from http://dev.mysql.com/doc/refman/5.0/en/secure-create-certs.html and mysql from xamp.

thx for kind support so far Thomas