error connecting mysql with ssl

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
tintinux
Junior Boarder
Junior Boarder
Posts: 43
Joined: 19.05.2010, 10:39

error connecting mysql with ssl

Post by tintinux »

Hi

I'm using MySql, Zeos 7.1.4 stable, and Lazarus on Linux Ubuntu (client and server)

I have ssl setup on a test server and working certificates and key, and I can succesfully connect without zeos, like this :

Code: Select all

~$ mysql -h mrit.com -utestzeos -p --ssl-ca=/tmp/testzeos/authority_certif.pem --ssl-cert=/tmp/testzeos/client_certif.pem --ssl-key=/tmp/testzeos/client_key.pem
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8628
Server version: 5.5.44-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like 'have%ssl%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_openssl  | YES   |
| have_ssl      | YES   |
+---------------+-------+
2 rows in set (0.04 sec)
I have attached a test in Lazarus which can easily be used with Delphi if needed, where I tried to setup SSL in the ZConnection1 properties.
The password is the same as the user.
With the default properties :

Code: Select all

MYSQL_SSL=TRUE
MYSQL_SSL_CA=/tmp/testzeos/authority_certif.pem
MYSQL_SSL_CERT=/tmp/testzeos/client_certif.pem
MYSQL_SSL_KEY=/tmp/testzeos/client_key.pem
the connection fails, with an error message about the server (not ssl ?).

When I remove every line in the properties, connection is successful.

By the way, with MYSQL_SSL=FALSE there is also an error.

You can try with your own certificates if you want, anyone should work for this test.
I could generate and send you by mail some, if you need.

Am I missing something, or wrong somewhere ?
Which tests could I do to find out the issue ?
Does it works on your systems ?

Thanks for help
You do not have the required permissions to view the files attached to this post.
Post Reply