Skip to content

Commit

Permalink
Merge branch 'eduardomozart-patch-9' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Jan 20, 2025
2 parents 69200f3 + 47a5c88 commit 8caa398
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ core:
- Targets list also show target planned tasks for trusted clients
* Refacto: Add Logger api to register a callback permitting to collect journaling events
* Fix ToolBox job events support
* Support ssl-keystore=system-ssl-ca on MacOSX to force using system known public CAs

inventory:
* Fix rare windows perl error during drives, ipv6 network or videos inventory
Expand Down
10 changes: 8 additions & 2 deletions lib/GLPI/Agent/HTTP/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,15 @@ sub _KeyChain_or_KeyStore_Export {
SUFFIX => ".pem",
);
my $file = $tmpfile->filename;
my $command = "security find-certificate -a -p";

# Support --ssl-keystore=system-ssl-ca option on MacOSX
$command .= " /System/Library/Keychains/SystemRootCertificates.keychain"
if $self->{ssl_keystore} && $self->{ssl_keystore} =~ /^system-ssl-ca$/i;

getAllLines(
command => "security find-certificate -a -p > '$file'",
logger => $logger
command => "$command > '$file'",
logger => $logger
);
@certs = IO::Socket::SSL::Utils::PEM_file2certs($file)
if -s $file;
Expand Down

0 comments on commit 8caa398

Please sign in to comment.