File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 70
70
$ config ['db ' ]['ssl_cert ' ] = '/path/to/cert.crt ' ; // path to an SSL certificate file. Only makes sense combined with ssl_key
71
71
$ config ['db ' ]['ssl_ca ' ] = '/path/to/ca.crt ' ; // path to a file containing SSL CA certs
72
72
$ config ['db ' ]['ssl_capath ' ] = '/path/to/ca_certs ' ; // path to a directory containing CA certs
73
- $ config ['db ' ]['ssl_cipher ' ] = '/DHE-RSA-AES256-SHA:AES128-SHA ' ; // one or more SSL Ciphers
73
+ $ config ['db ' ]['ssl_cipher ' ] = 'DHE-RSA-AES256-SHA:AES128-SHA ' ; // one or more SSL Ciphers
74
+ $ config ['db ' ]['ssl_verify ' ] = true ; // Verify Common Name (CN) of server certificate?
Original file line number Diff line number Diff line change @@ -905,6 +905,10 @@ private function set_db_params () {
905
905
906
906
$ this ->ssl = array ();
907
907
908
+ if ($ config ['db ' ]['ssl_verify ' ]===false ) {
909
+ $ this ->ssl [PDO ::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT ] = false ;
910
+ }
911
+
908
912
foreach ($ this ->pdo_ssl_opts as $ key => $ pdoopt ) {
909
913
if ($ config ['db ' ][$ key ]) {
910
914
$ this ->ssl [$ pdoopt ] = $ config ['db ' ][$ key ];
@@ -1011,4 +1015,4 @@ public function getForeignKeyInfo() {
1011
1015
1012
1016
return array ($ foreignLinksByTable , $ foreignLinksByRefTable );
1013
1017
}
1014
- }
1018
+ }
You can’t perform that action at this time.
0 commit comments