OpenLEADR/openleadr-python

How to import OpenSSL.crypto correctly

Opened this issue · 0 comments

I am getting the following error, when I try to compile my custom VEN.py code.

Traceback (most recent call last):
  File "/root/openleadr-python/./pma/VEN.py", line 3, in <module>
    from openleadr import OpenADRClient, enable_default_logging
  File "/usr/local/lib/python3.12/dist-packages/openleadr/__init__.py", line 20, in <module>
    from .client import OpenADRClient
  File "/usr/local/lib/python3.12/dist-packages/openleadr/client.py", line 27, in <module>
    from signxml.exceptions import InvalidSignature
  File "/usr/local/lib/python3.12/dist-packages/signxml/__init__.py", line 7, in <module>
    from .verifier import XMLVerifier, VerifyResult, SignatureConfiguration
  File "/usr/local/lib/python3.12/dist-packages/signxml/verifier.py", line 13, in <module>
    from OpenSSL.crypto import verify as openssl_verify
ImportError: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location)

However, if I comment out the following
from OpenSSL.crypto import verify as openssl_verify
line from verifier.py, the code goes through

image

How do I properly source the OpenSSL.crypto library, so that the verify function can be added?

The first three lines are getting picked up. Even though they are from the same library.
image

What am I missing? I am just getting started with this repo.