Skip to content

Commit

Permalink
More work on DB SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed May 9, 2024
1 parent abd1ea4 commit 03228a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion upload/install/model/install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ModelInstallInstall extends Model {
* @return void
*/
public function database(array $data): void {
$db = new \DB($data['db_driver'], htmlspecialchars_decode($data['db_hostname']), htmlspecialchars_decode($data['db_username']), htmlspecialchars_decode($data['db_password']), htmlspecialchars_decode($data['db_database']), $data['db_port']);
$db = new \DB($data['db_driver'], htmlspecialchars_decode($data['db_hostname']), htmlspecialchars_decode($data['db_username']), htmlspecialchars_decode($data['db_password']), htmlspecialchars_decode($data['db_database']), $data['db_port'], $data['db_ssl_key'], $data['db_ssl_cert'], $data['db_ssl_ca']);

$file = DIR_APPLICATION . 'opencart.sql';

Expand Down
3 changes: 3 additions & 0 deletions upload/system/config/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
$_['db_database'] = '';
$_['db_port'] = 3306;
$_['db_autostart'] = false;
//$_['db_ssl_key'] = '';
//$_['db_ssl_cert'] = '';
//$_['db_ssl_ca'] = '';

// Mail
$_['mail_engine'] = 'mail'; // mail or smtp
Expand Down
2 changes: 1 addition & 1 deletion upload/system/framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

// Database
if ($config->get('db_autostart')) {
$db = new \DB($config->get('db_engine'), $config->get('db_hostname'), $config->get('db_username'), $config->get('db_password'), $config->get('db_database'), $config->get('db_port'));
$db = new \DB($config->get('db_engine'), $config->get('db_hostname'), $config->get('db_username'), $config->get('db_password'), $config->get('db_database'), $config->get('db_port'), $config->get('db_ssl_key'), $config->get('db_ssl_cert'), $config->get('db_ssl_ca'));
$registry->set('db', $db);

// Sync PHP and DB time zones
Expand Down

0 comments on commit 03228a5

Please sign in to comment.