Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error al intentar crear una instancia de Fiel #56

Open
jcmoneymx opened this issue Jul 10, 2024 · 2 comments
Open

Error al intentar crear una instancia de Fiel #56

jcmoneymx opened this issue Jul 10, 2024 · 2 comments

Comments

@jcmoneymx
Copy link

jcmoneymx commented Jul 10, 2024

>>> fiel = Fiel(cer_der, key_der, 'passphrase-redactado')
Traceback (most recent call last):
  File "/usr/lib/python3.11/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "/root/workspace/venv/lib/python3.11/site-packages/cfdiclient/fiel.py", line 13, in __init__
    self.__importar_key__(key_der, passphrase)
  File "/root/workspace/venv/lib/python3.11/site-packages/cfdiclient/fiel.py", line 21, in __importar_key__
    self.key = RSA.importKey(key_der, passphrase)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/workspace/venv/lib/python3.11/site-packages/Crypto/PublicKey/RSA.py", line 789, in import_key
    return _import_keyDER(extern_key, passphrase)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/workspace/venv/lib/python3.11/site-packages/Crypto/PublicKey/RSA.py", line 688, in _import_keyDER
    raise ValueError("RSA key format is not supported")
ValueError: RSA key format is not supported

estoy teniendo este problema al intentar cargar una Fiel, este error salta si el passphrase es incorrecto pero en este caso estoy seguro que es el passphrase utilizado es el correcto porque entro al sat con la misma llave privada, certificado y passphrase y hago tramites.

les ha pasado antes? tendran alguna pista??

de antemano muchas gracias, excelente libreria

Edit: cambiaré la contraseña e intentaré de nuevo, les informo el resultado.

Copy link

Bienvenido nuestro proyecto python-cfdiclient

@Nesgc
Copy link

Nesgc commented Aug 20, 2024

Probablemente sea la contraseña

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants