File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -589,6 +589,7 @@ sub _KeyChain_or_KeyStore_Export {
589
589
);
590
590
591
591
my @certs = ();
592
+ my $loadMozillaCA = 1;
592
593
593
594
File::Temp-> require();
594
595
if ($EVAL_ERROR ) {
@@ -606,8 +607,11 @@ sub _KeyChain_or_KeyStore_Export {
606
607
my $command = " security find-certificate -a -p" ;
607
608
608
609
# Support --ssl-keystore=system-ssl-ca option on MacOSX
609
- $command .= " /System/Library/Keychains/SystemRootCertificates.keychain"
610
- if $self -> {ssl_keystore } && $self -> {ssl_keystore } =~ / ^system-ssl-ca$ /i ;
610
+ if ($self -> {ssl_keystore } && $self -> {ssl_keystore } =~ / ^system-ssl-ca$ /i ) {
611
+ $command .= " /System/Library/Keychains/SystemRootCertificates.keychain" ;
612
+ # In that case, we don't need to load Mozilla::CA
613
+ $loadMozillaCA = 0;
614
+ }
611
615
612
616
getAllLines(
613
617
command => " $command > '$file '" ,
@@ -698,7 +702,7 @@ sub _KeyChain_or_KeyStore_Export {
698
702
}
699
703
700
704
# Always include default CA file from Mozilla::CA
701
- if (Mozilla::CA-> require()) {
705
+ if ($loadMozillaCA && $ Mozilla::CA-> require()) {
702
706
my $cacert = Mozilla::CA::SSL_ca_file();
703
707
push @certs , IO::Socket::SSL::Utils::PEM_file2certs($cacert )
704
708
if -e $cacert ;
You can’t perform that action at this time.
0 commit comments