Skip to content

Fix loading certificate from .pfx file#245

Merged
LordHepipud merged 1 commit into
Icinga:masterfrom
haxtibal:bugfix/find_pfx_cert
May 25, 2021
Merged

Fix loading certificate from .pfx file#245
LordHepipud merged 1 commit into
Icinga:masterfrom
haxtibal:bugfix/find_pfx_cert

Conversation

@haxtibal

Copy link
Copy Markdown
Contributor

If you tried this

Use-Icinga; Get-IcingaSSLCertForSocket -CertFile "C:/my/cert.pfx"

the former code expanded like

$FileType = Get-Item -Path "C:/my/cert.pfx";
if ("cert.pfx" -eq '.pfx') { ... not reached ... }

and thus did not load the certificate file.

Now use GetExtension instead of Get-Item to make the .pfx check work.

If you tried this
 Use-Icinga; Get-IcingaSSLCertForSocket -CertFile "C:/my/cert.pfx"

the former code expanded like
 $FileType = Get-Item -Path "C:/my/cert.pfx";
 if ("cert.pfx" -eq '.pfx') { ... not reached ... }

and thus did not load the certificate file.

Now use GetExtension instead of Get-Item to make the .pfx check work.
@LordHepipud LordHepipud self-assigned this May 20, 2021
@LordHepipud LordHepipud added the Enhancement New feature or request label May 20, 2021
@LordHepipud LordHepipud added this to the v1.5.0 milestone May 20, 2021
@LordHepipud LordHepipud added Bug There is an issue present and removed Enhancement New feature or request labels May 20, 2021

@LordHepipud LordHepipud left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFTM

@LordHepipud

Copy link
Copy Markdown
Collaborator

Thanks !

@LordHepipud LordHepipud merged commit 221973a into Icinga:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug There is an issue present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants