Skip to content

Commit 1cb5912

Browse files
MyvTsvstonebuzzRom1-B
authored
fix(sccm): Respect verify_ssl_cert setting for SQL Server connections (#157)
* fix(sccm): Respect verify_ssl_cert setting for SQL Server connections * CHANGELOG.md * Update inc/sccmdb.class.php Co-authored-by: Stanislas <[email protected]> * review * review * review * review * lint * fix(sccm): Respect verify_ssl_cert setting for SQL Server connections * lint * Update inc/sccmdb.class.php Co-authored-by: Romain B. <[email protected]> --------- Co-authored-by: Stanislas <[email protected]> Co-authored-by: Romain B. <[email protected]>
1 parent 0fdaf71 commit 1cb5912

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1919

2020
- GLPI 11 compatibility
2121

22+
### Fixed
23+
24+
- Fix option ```verify_ssl_cert``` not working for connections
25+
26+
2227
## [2.4.4] - 2025-09-24
2328

2429
### Added

inc/sccmdb.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public function connect()
7272
$host = $config->getField('sccmdb_host');
7373
$dbname = $config->getField('sccmdb_dbname');
7474
$user = $config->getField('sccmdb_user');
75+
$verify_ssl_cert = (bool) $config->getField('verify_ssl_cert');
7576

7677
$password = $config->getField('sccmdb_password');
7778
$password = (new GLPIKey())->decrypt($password);
@@ -81,6 +82,7 @@ public function connect()
8182
"Uid" => $user,
8283
"PWD" => $password,
8384
"CharacterSet" => "UTF-8",
85+
"TrustServerCertificate" => !$verify_ssl_cert,
8486
];
8587

8688
$this->dbconn = sqlsrv_connect($host, $connection_options);

0 commit comments

Comments
 (0)