summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorAlexander Tereschenko <aleksandr.v.tereschenko@linux.intel.com>2013-11-05 00:44:54 +0100
committerSimon Green <sgreen@redhat.com>2013-11-05 00:44:54 +0100
commit7241e5286deab1bb5166ff7e713ff93f08409af0 (patch)
tree29774a3f7e50cafff75280e742c3c5e1733185f4 /Bugzilla
parente79ac7a5a2535edb9955b88b6515523385f8e653 (diff)
downloadbugzilla-7241e5286deab1bb5166ff7e713ff93f08409af0.tar.gz
bugzilla-7241e5286deab1bb5166ff7e713ff93f08409af0.tar.xz
Bug 906191 - Introduce SSL for Bugzilla DB connections for MySQL
r=simon, a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB/Mysql.pm12
-rw-r--r--Bugzilla/Install/Localconfig.pm16
2 files changed, 28 insertions, 0 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 908e12721..9c636e2b4 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -58,6 +58,18 @@ sub new {
mysql_auto_reconnect => 1,
);
+ # MySQL SSL options
+ my ($ssl_ca_file, $ssl_ca_path, $ssl_cert, $ssl_key) =
+ @$params{qw(db_mysql_ssl_ca_file db_mysql_ssl_ca_path
+ db_mysql_ssl_client_cert db_mysql_ssl_client_key)};
+ if ($ssl_ca_file || $ssl_ca_path || $ssl_cert || $ssl_key) {
+ $attrs{'mysql_ssl'} = 1;
+ $attrs{'mysql_ssl_ca_file'} = $ssl_ca_file if $ssl_ca_file;
+ $attrs{'mysql_ssl_ca_path'} = $ssl_ca_path if $ssl_ca_path;
+ $attrs{'mysql_ssl_client_cert'} = $ssl_cert if $ssl_cert;
+ $attrs{'mysql_ssl_client_key'} = $ssl_key if $ssl_key;
+ }
+
my $self = $class->db_new({ dsn => $dsn, user => $user,
pass => $pass, attrs => \%attrs });
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm
index 3fa253729..d469e13ab 100644
--- a/Bugzilla/Install/Localconfig.pm
+++ b/Bugzilla/Install/Localconfig.pm
@@ -80,6 +80,22 @@ use constant LOCALCONFIG_VARS => (
default => 1,
},
{
+ name => 'db_mysql_ssl_ca_file',
+ default => '',
+ },
+ {
+ name => 'db_mysql_ssl_ca_path',
+ default => '',
+ },
+ {
+ name => 'db_mysql_ssl_client_cert',
+ default => '',
+ },
+ {
+ name => 'db_mysql_ssl_client_key',
+ default => '',
+ },
+ {
name => 'index_html',
default => 0,
},