[2.7] certificate_complete_chain: fix stacktrace on parsing error (#49988)

* Fix stacktrace when fail_on_error is False and a file cannot be parsed. (#49987)


(cherry picked from commit 65d5f1a4ef)

* Add changelog.
This commit is contained in:
Felix Fontein 2019-01-07 18:28:59 +01:00 committed by Toshio Kuratomi
parent 898ec291b0
commit 47228b8cf1
2 changed files with 3 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "certificate_complete_chain - fix behavior when invalid file is parsed while reading intermediate or root certificates."

View file

@ -230,6 +230,7 @@ def load_PEM_list(module, path, fail_on_error=True):
module.fail_json(msg=msg)
else:
module.warn(msg)
return []
class CertificateSet(object):