8 messages in com.mysql.lists.plusplusRe: possible bug in rc3 ?| From | Sent On | Attachments |
|---|---|---|
| Thomas Werth | 07 Feb 2008 06:05 | |
| Warren Young | 07 Feb 2008 14:28 | |
| Thomas Werth | 07 Feb 2008 22:53 | |
| Warren Young | 08 Feb 2008 17:05 | |
| Thomas Werth | 10 Feb 2008 23:08 | |
| Thomas Werth | 10 Feb 2008 23:30 | |
| Warren Young | 11 Feb 2008 17:33 | |
| Thomas Werth | 11 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




