berdav/greenpass

OpenSSL problems with python3.9 (with python3.7 works)

verbavolant opened this issue · 1 comments

Hi!
With the same distro (debian) buth different python version (3.7 works, 3.9 not) i've got this. Different method in cert loading?

Traceback (most recent call last):
File "/root/make/greenpass/./greenpass.py", line 114, in
res = logic.verify_certificate(out, gpp, sm, cup)
File "/root/make/greenpass/greenpass/logic.py", line 315, in verify_certificate
key = cup.get_key_coseobj(gpp.get_kid())
File "/root/make/greenpass/greenpass/api.py", line 109, in get_key_coseobj
pubkey = self.loadpubkey(certificate)
File "/root/make/greenpass/greenpass/api.py", line 84, in loadpubkey
x509 = crypto.load_certificate(crypto.FILETYPE_ASN1, certificate)
File "/usr/local/lib/python3.9/dist-packages/OpenSSL/crypto.py", line 1973, in load_certificate
_raise_current_error()
File "/usr/local/lib/python3.9/dist-packages/OpenSSL/_util.py", line 57, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.crypto.Error: [('asn1 encoding routines', 'ASN1_get_object', 'header too long')]

solved:
clean /home/user/.local/greenpass directory