ThinkboxSoftware / SSLGeneration

A simple python script for generating openssl certificates.
Apache License 2.0
19 stars 4 forks source link

'OpenSSL.crypto' has no attribute 'PKCS12' -- Needs to be updated with cryptography library #8

Open Ahuge opened 2 months ago

Ahuge commented 2 months ago

Hi running this code no longer works as of PyOpenSSL 24.1.0

They have finally removed OpenSSL.crypto.PKCS12 https://github.com/pyca/pyopenssl/blob/main/CHANGELOG.rst#2410-2024-03-09

I believe the recommendation is now to move to the cryptography package. Are there plans to update this library to support cryptography?

Traceback (most recent call last): File "/opt/Thinkbox/DeadlineDatabase10/ssl_gen2.py", line 390, in sslgen.gen_pfx( args.cert_name, args.passphrase ) File "/opt/Thinkbox/DeadlineDatabase10/ssl_gen2.py", line 245, in gen_pfx pkcs12 = crypto.PKCS12() File "/usr/local/lib64/python3.7/site-packages/cryptography/utils.py", line 72, in getattr obj = getattr(self._module, attr) AttributeError: module 'OpenSSL.crypto' has no attribute 'PKCS12'

rondeau-aws commented 2 months ago

Thank you for bringing this to our attention! We added this to our backlog.