Roundcube mysql with ssl + password plugin

Description: Roundcube mysql with ssl
Dependencies: roundcube 0.95, php 5.3.7, mysql server configure for ssl, pear module and php-mdb2-driver-mysql

Howto
change in file "$ROUNDCUBE_DIR/roundcube/program/lib/Roundcube/rcube_db_mysql.php"

MYSQL_ATTR_KEY TO -> MYSQL_ATTR_SSL_KEY

Should look like:
if (!empty($dsn['key'])) {
$result[PDO::MYSQL_ATTR_SSL_KEY] = $dsn['key'];
}

And in
In different versions maybe more will be changed.
References: http://cz2.php.net/ref.pdo-mysql

PDO::MYSQL_ATTR_SSL_CA (integer)
The file path to the SSL certificate authority.

PDO::MYSQL_ATTR_SSL_CAPATH (integer)
The file path to the directory that contains the trusted SSL CA certificates, which are stored in PEM format.

PDO::MYSQL_ATTR_SSL_CERT (integer)
The file path to the SSL certificate.

PDO::MYSQL_ATTR_SSL_CIPHER (integer)
A list of one or more permissible ciphers to use for SSL encryption, in a format understood by OpenSSL. For example: DHE-RSA-AES256-SHA:AES128-SHA

PDO::MYSQL_ATTR_SSL_KEY (integer)

The file path to the SSL key.

Password plugin for roundcube passwd query example:

$rcmail_config['password_query'] = 'UPDATE virtual_users SET password=ENCRYPT(%p,concat("$6$", SUBSTRING(SHA(RAND()), -16))) WHERE email=%u LIMIT 1';

Suburban Glory Web Design