This PR makes it possible to set multiple values for Issuer and DN (makes them arrays). Setting them as arrays allows a single configuration be used for a wider range of circumstances, such as multi-cloud environments where the issuer might be different in each. To achieve this the Find-Certificate function has been overhauled from a series of if-then-else statements, to something more like a compiler for a Where-Object filter script block. This reduces repetition and complexity, and should make it easier to add additional filter parameters. In cases where multiple matching certificates exist, the final list is sorted based on the array input order to ensure determinism, and the first one is returned.
Care has been taken to ensure all existing tests pass, although some minor modifications were required to add new tests. Several additional tests were added.
This PR also fixes #89 as a separate commit, although those changes have no functional effect.
Additional information in the commit comments.
This Pull Request (PR) fixes the following issues
Fixes #89
Task list
[ ] Added an entry to the change log under the Unreleased section of the
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
[ ] Resource documentation added/updated in README.md.
[ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
[ ] Comment-based help added/updated.
[ ] Localization strings added/updated in all localization files as appropriate.
Pull Request (PR) description
This PR makes it possible to set multiple values for
Issuer
andDN
(makes them arrays). Setting them as arrays allows a single configuration be used for a wider range of circumstances, such as multi-cloud environments where the issuer might be different in each. To achieve this theFind-Certificate
function has been overhauled from a series ofif-then-else
statements, to something more like a compiler for aWhere-Object
filter script block. This reduces repetition and complexity, and should make it easier to add additional filter parameters. In cases where multiple matching certificates exist, the final list is sorted based on the array input order to ensure determinism, and the first one is returned.Care has been taken to ensure all existing tests pass, although some minor modifications were required to add new tests. Several additional tests were added.
This PR also fixes #89 as a separate commit, although those changes have no functional effect.
Additional information in the commit comments.
This Pull Request (PR) fixes the following issues
Task list
This change is