Konfiguracja połączenia SSL dla bazy MySQL
md netcert
set OPENSSL_CONF=C:\Programy\GnuWin32\share\openssl.cnf
openssl genrsa 2048 > netcert\ca-key.pem
openssl req -new -x509 -nodes -days 3600 -key netcert\ca-key.pem -out netcert\ca.pem
openssl req -newkey rsa:2048 -days 3600 -nodes -keyout netcert\server-key.pem -out netcert\server-req.pem
openssl rsa -in netcert\server-key.pem -out netcert\server-key.pem
openssl x509 -req -in netcert\server-req.pem -days 3600 -CA netcert\ca.pem -CAkey netcert\ca-key.pem -set_serial 01 -out netcert\server-cert.pem
openssl req -newkey rsa:2048 -days 3600 -nodes -keyout netcert\client-key.pem -out netcert\client-req.pem
openssl rsa -in netcert\client-key.pem -out netcert\client-key.pem
openssl x509 -req -in netcert\client-req.pem -days 3600 -CA netcert\ca.pem -CAkey netcert\ca-key.pem -set_serial 01 -out netcert\client-cert.pem
openssl verify -CAfile netcert\ca.pem netcert\server-cert.pem netcert\client-cert.pem
MySQL:
[mysqld]
ssl-ca="..../ssl/ca.pem"
ssl-cert="..../ssl/server-cert.pem"
ssl-key="..../ssl/server-key.pem"
Kod PHP do sprawdzenia:
Źródło: http://dev.mysql.com/doc/refman/5.5/en/creating-ssl-certs.html oraz http://www.percona.com/blog/2013/06/22/setting-up-mysql-ssl-and-secure-connections/