SecurityInnovation / PGPy

Pretty Good Privacy for Python
BSD 3-Clause "New" or "Revised" License
313 stars 98 forks source link

AttributeError: module 'cryptography.utils' has no attribute 'register_interface' #432

Open jeffny2015 opened 1 year ago

jeffny2015 commented 1 year ago

Hi team,

Im facing this issue if you can help me, it was working in older version but the problem is, i have to fix vulnerabilities and versions <39.0.1 are impacted:

File "main.py" , line 10, in <module>
    from pgpy import PGPKey, PGPMessage
  File "/python3.8/site-packages/pgpy/__init__.py", line 4, in <module>
    from .pgp import PGPKey
  File "/python3.8/site-packages/pgpy/pgp.py", line 27, in <module>
    from .constants import CompressionAlgorithm
  File "/python3.8/site-packages/pgpy/constants.py", line 23, in <module>
    from ._curves import BrainpoolP256R1, BrainpoolP384R1, BrainpoolP512R1, X25519, Ed25519
  File "/python3.8/site-packages/pgpy/_curves.py", line 37, in <module>
    @utils.register_interface(ec.EllipticCurve)
AttributeError: module 'cryptography.utils' has no attribute 'register_interface'

i just updated the cryptopgraphy to 39.0.1 it was the only library impacted cryptography==39.0.1

any help is apreciated

dhiltonp commented 1 year ago

This error is fixed with pgpy>=6.0.0.