I need to connect php and mysql; however, each reside on different servers, because of this I want to encrypt the data transmitted.
I created and signed my own certificates using openssl, to connect both the server and the client with the key.
I'm requiring the mysql user to use the "require issuer" instead of require ssl, by using the following command:
grant all privileges on table.* to 'user'@'iphere' identified by 'mysupersecretpass' require issuer 'details here';
To do this on php i'm using this function:
mysqli_ssl_set ( mysqli $link , string $key , string $cert , string $ca , string $capath , string $cipher )
I have set the following specifications
mysqli_ssl_set ( mysqli $link , "path to client-key", "path to client-cert" , "path to ca" , NULL , NULL)
This works, the connection is encrypted. The problem is that I'm not sure if it is properly encrypted.
I'm thinking this because it doesn't appear to take the "path to ca", I can put anything in that field such as a random string, NULL, any number, and the database server (MYSQL) still takes it. Whether I put the proper path to ca or not the connection still shows to be encrypted.
Can anyone help or can give an advise why this is happening? Any help is greatly appreciated