Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fixed pipeline by replacing the GitVersion task in the `azure-pipelines.yml`
with a script.
- Passed in an empty string to X509Certificate2.Import so that we do not get MethodCountCouldNotFindBest exception when using a null
password for the PFX certificate. Fixes [Issue #258](https://github.com/dsccommunity/CertificateDsc/issues/258)

## [5.1.0] - 2021-02-26

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@
}
else
{
$cert.Import($importDataValue, $flags)
$cert.Import($importDataValue, "", $flags)

Check warning on line 1085 in source/Modules/CertificateDsc.Common/CertificateDsc.Common.psm1

View check run for this annotation

Codecov / codecov/patch

source/Modules/CertificateDsc.Common/CertificateDsc.Common.psm1#L1085

Added line #L1085 was not covered by tests
}

$certStore = New-Object `
Expand Down