CertificateDsc icon indicating copy to clipboard operation
CertificateDsc copied to clipboard

PfxImport: Add empty string password to .Import method

Open cmielke opened this issue 2 years ago • 4 comments

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

  • [x] Added an entry under the Unreleased section of the CHANGELOG.md. Entry should say what was changed, and how that affects users (if applicable).
  • [ ] Resource documentation added/updated in the resource folder.
  • [ ] Resource parameter descriptions added/updated in schema.mof and comment-based help.
  • [ ] Comment-based help added/updated.
  • [ ] Localization strings added/updated in all localization files as appropriate.
  • [ ] Examples appropriately added/updated.
  • [ ] Unit tests added/updated. See DSC Resource Testing Guidelines.
  • [ ] Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
  • [x] New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

This change is Reviewable

cmielke avatar Aug 10 '21 20:08 cmielke

Codecov Report

Merging #259 (48804b7) into main (8d5f01f) will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #259   +/-   ##
===================================
  Coverage    84%    84%           
===================================
  Files         7      7           
  Lines       933    933           
===================================
  Hits        790    790           
  Misses      143    143           
Impacted Files Coverage Δ
...s/CertificateDsc.Common/CertificateDsc.Common.psm1 81% <0%> (ø)

codecov[bot] avatar Aug 10 '21 20:08 codecov[bot]

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

bdrans avatar Dec 13 '22 23:12 bdrans

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!

PlagueHO avatar Jul 03 '23 10:07 PlagueHO

I have rebased against main. Hopefully that will work.

cmielke avatar Jul 03 '23 16:07 cmielke