Lines 77-88
sub dbh {
Link Here
|
77 |
if ($driver eq 'mysql') { |
77 |
if ($driver eq 'mysql') { |
78 |
my $tls = $config->get("tls"); |
78 |
my $tls = $config->get("tls"); |
79 |
if ($tls && $tls eq 'yes') { |
79 |
if ($tls && $tls eq 'yes') { |
80 |
$dsn .= sprintf( |
80 |
|
81 |
';mysql_ssl=1;mysql_ssl_client_key=%s;mysql_ssl_client_cert=%s;mysql_ssl_ca_file=%s', |
81 |
$dsn .= ';mysql_ssl=1'; |
82 |
$config->get('key'), |
82 |
|
83 |
$config->get('cert'), |
83 |
my $mysql_ssl_client_key = $config->get('key'); |
84 |
$config->get('ca'), |
84 |
my $mysql_ssl_client_cert = $config->get('cert'); |
85 |
); |
85 |
my $mysql_ssl_ca_file = $config->get('ca'); |
|
|
86 |
|
87 |
if ( $mysql_ssl_client_key && $mysql_ssl_client_key ne '__DB_TLS_CLIENT_KEY__' ) { |
88 |
$dsn .= sprintf( ';mysql_ssl_client_key=%s', $mysql_ssl_client_key ); |
89 |
} |
90 |
|
91 |
if ( $mysql_ssl_client_cert && $mysql_ssl_client_cert ne '__DB_TLS_CLIENT_CERTIFICATE__' ) { |
92 |
$dsn .= sprintf( ';mysql_ssl_client_cert=%s', $mysql_ssl_client_cert ); |
93 |
} |
94 |
|
95 |
if ( $mysql_ssl_ca_file && $mysql_ssl_ca_file ne '__DB_TLS_CA_CERTIFICATE__' ) { |
96 |
$dsn .= sprintf( ';mysql_ssl_ca_file=%s', $mysql_ssl_ca_file ); |
97 |
} |
86 |
} |
98 |
} |
87 |
|
99 |
|
88 |
$attr->{mysql_enable_utf8} = 1; |
100 |
$attr->{mysql_enable_utf8} = 1; |
89 |
- |
|
|