Failed to Add Target Files when following instruction in TUTORIAL.md
See original GitHub issueI was following the TUTORIAL.md
And at the line private_targets_key = import_rsa_privatekey_from_file("keystore/targets_key")
after I enter password, it returns an error:
_Traceback (most recent call last): File “/usr/local/lib/python3.6/dist-packages/securesystemslib/pyca_crypto_keys.py”, line 611, in create_rsa_public_and_private_from_pem passphrase, backend=default_backend()) File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/primitives/serialization.py”, line 20, in load_pem_private_key return backend.load_pem_private_key(data, password) File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/backends/openssl/backend.py”, line 1014, in load_pem_private_key password, File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/backends/openssl/backend.py”, line 1233, in _load_key self._handle_key_loading_error() File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/backends/openssl/backend.py”, line 1291, in _handle_key_loading_error raise ValueError(“Could not deserialize key data.”) ValueError: Could not deserialize key data.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/home/thangld_anm/newSIEM/tuf/tuf/repository_lib.py”, line 824, in import_rsa_privatekey_from_file filepath, password) File “/usr/local/lib/python3.6/dist-packages/securesystemslib/interface.py”, line 350, in import_rsa_privatekey_from_file scheme, password) File “/usr/local/lib/python3.6/dist-packages/securesystemslib/keys.py”, line 974, in import_rsakey_from_private_pem pem, password) File “/usr/local/lib/python3.6/dist-packages/securesystemslib/pyca_crypto_keys.py”, line 625, in create_rsa_public_and_private_from_pem ’ cannot be generated from the encrypted PEM string: ’ + str(e)) securesystemslib.exceptions.CryptoError: RSA (public, private) tuple cannot be generated from the encrypted PEM string: Could not deserialize key data.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/usr/local/lib/python3.6/dist-packages/securesystemslib/pyca_crypto_keys.py”, line 611, in create_rsa_public_and_private_from_pem passphrase, backend=default_backend()) File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/primitives/serialization.py”, line 20, in load_pem_private_key return backend.load_pem_private_key(data, password) File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/backends/openssl/backend.py”, line 1014, in load_pem_private_key password, File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/backends/openssl/backend.py”, line 1233, in _load_key self._handle_key_loading_error() File “/usr/local/lib/python3.6/dist-packages/cryptography/hazmat/backends/openssl/backend.py”, line 1291, in _handle_key_loading_error raise ValueError(“Could not deserialize key data.”) ValueError: Could not deserialize key data.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/home/thangld_anm/newSIEM/tuf/tuf/repository_tool.py”, line 3185, in import_rsa_privatekey_from_file return repo_lib.import_rsa_privatekey_from_file(filepath, password) File “/home/thangld_anm/newSIEM/tuf/tuf/repository_lib.py”, line 831, in import_rsa_privatekey_from_file filepath, password, prompt=True) File “/usr/local/lib/python3.6/dist-packages/securesystemslib/interface.py”, line 350, in import_rsa_privatekey_from_file scheme, password) File “/usr/local/lib/python3.6/dist-packages/securesystemslib/keys.py”, line 974, in import_rsakey_from_private_pem pem, password) File “/usr/local/lib/python3.6/dist-packages/securesystemslib/pyca_crypto_keys.py”, line 625, in create_rsa_public_and_private_from_pem ’ cannot be generated from the encrypted PEM string: ’ + str(e)) securesystemslib.exceptions.CryptoError: RSA (public, private) tuple cannot be generated from the encrypted PEM string: Could not deserialize key data. _ Can you tell me how can I fix this? Thank you.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
I’ll take a look and see if I can reproduce this today. 🙂 Thanks for creating an issue.
The test runs successfully. Look like my code is wrong somewhere. I’ll take a look. Thanks for response. You can close this issue now. 👍