mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 21:33:00 +00:00
* Fix crash when trying to get non-existing other certificates.
* Add test.
(cherry picked from commit 9ed4526fee)
This commit is contained in:
@@ -542,6 +542,8 @@ class PkcsPyOpenSSL(Pkcs):
|
||||
return crypto.dump_certificate(crypto.FILETYPE_PEM, cert) if cert else None
|
||||
|
||||
def _dump_other_certificates(self, pkcs12):
|
||||
if pkcs12.get_ca_certificates() is None:
|
||||
return []
|
||||
return [
|
||||
crypto.dump_certificate(crypto.FILETYPE_PEM, other_cert)
|
||||
for other_cert in pkcs12.get_ca_certificates()
|
||||
|
||||
Reference in New Issue
Block a user