certificate_complete_chain: avoid infinite loops, and double roots when root certificate was already part of chain (#360) (#366)

* Avoid infinite loops, and double roots when root certificate was already part of chain.

* Refactor tests for readability.

(cherry picked from commit 6ee238d961)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2022-01-04 07:27:15 +01:00
committed by GitHub
parent 5741f24aa9
commit 20b0d7a298
3 changed files with 146 additions and 54 deletions

View File

@@ -0,0 +1,3 @@
bugfixes:
- "certificate_complete_chain - do not hang when infinite loop is found (https://github.com/ansible-collections/community.crypto/issues/355, https://github.com/ansible-collections/community.crypto/pull/360)."
- "certificate_complete_chain - do not append root twice if the chain already ends with a root certificate (https://github.com/ansible-collections/community.crypto/pull/360)."