openssl_pkcs12: do not crash when there's no certificate and/or private key in existing PKCS#12 file (#109)

* Do not crash when PKCS#12 file contains no private key and/or main certificate.

* Add changelog fragment.

* Call getters only once each, check explicitly for None.

* Add test.

* Also 'parse' correctly PKCS#12 file with no private key.
This commit is contained in:
Felix Fontein
2020-09-16 11:25:24 +02:00
committed by GitHub
parent 1b3ff44bc2
commit 7cdfdc1bfb
4 changed files with 40 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
bugfixes:
- "openssl_pkcs12 - do not crash when reading PKCS#12 file which has no private key and/or no main certificate (https://github.com/ansible-collections/community.crypto/issues/103)."