dsccommunity / CertificateDsc

DSC resources to simplify administration of certificates on a Windows Server.
https://dsccommunity.org
MIT License
122 stars 69 forks source link

PfxImport: Add empty string password to .Import method #259

Open cmielke opened 3 years ago

cmielke commented 3 years ago

Pull Request (PR) description

Add an empty string to the X509Certificate2.Import to prevent the MethodCountCouldNotFindBest exception when using a null password to import the PFX certificate.

This Pull Request (PR) fixes the following issues

- Fixes #258 

Task list


This change is Reviewable

codecov[bot] commented 3 years ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 84%. Comparing base (e77b3da) to head (73826cd). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...s/CertificateDsc.Common/CertificateDsc.Common.psm1 0% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dsccommunity/CertificateDsc/pull/259/graphs/tree.svg?width=650&height=150&src=pr&token=bjPD8kXwus&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity)](https://app.codecov.io/gh/dsccommunity/CertificateDsc/pull/259?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) ```diff @@ Coverage Diff @@ ## main #259 +/- ## =================================== Coverage 84% 84% =================================== Files 7 7 Lines 933 933 =================================== Hits 790 790 Misses 143 143 ``` | [Files with missing lines](https://app.codecov.io/gh/dsccommunity/CertificateDsc/pull/259?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | Coverage Δ | | |---|---|---| | [...s/CertificateDsc.Common/CertificateDsc.Common.psm1](https://app.codecov.io/gh/dsccommunity/CertificateDsc/pull/259?src=pr&el=tree&filepath=source%2FModules%2FCertificateDsc.Common%2FCertificateDsc.Common.psm1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL01vZHVsZXMvQ2VydGlmaWNhdGVEc2MuQ29tbW9uL0NlcnRpZmljYXRlRHNjLkNvbW1vbi5wc20x) | `81% <0%> (ø)` | |
bdrans commented 1 year ago

Does anyone know what needs to be changed with the PR to get it merged? I'm running into this issue (#258) so it would be nice go get it merged

PlagueHO commented 1 year ago

Hi @cmielke - any chance you could rebase this against main? There have been a few fixes/changes to the pipeline. This should fix the build process so that all the tests pass. Thank you!

cmielke commented 1 year ago

I have rebased against main. Hopefully that will work.