Skip to content

Inaccurate error message about encrypted PEM string #286

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

Closed
lukpueh opened this issue Oct 14, 2020 · 1 comment · Fixed by #772
Closed

Inaccurate error message about encrypted PEM string #286

lukpueh opened this issue Oct 14, 2020 · 1 comment · Fixed by #772
Labels
legacy Issues related to legacy interfaces (obsolete with #731)

Comments

@lukpueh
Copy link
Member

lukpueh commented Oct 14, 2020

Description of issue or feature request:
Below error message in create_rsa_public_and_private_from_pem seems odd if the passed string is not encrypted and/or not a PEM, which is possible because PEMRSA_SCHEMA, which checks the input beforehand, just aliases
AnyString.

raise securesystemslib.exceptions.CryptoError('RSA (public, private) tuple'
' cannot be generated from the encrypted PEM string: ' + str(e))

Current behavior:
Error message is inaccurate for possible inputs

Expected behavior:
Fix error message or better sanitize inputs

@lukpueh
Copy link
Member Author

lukpueh commented Oct 14, 2020

The PEMRSA_SCHEMA == AnyString-issue is described in #183 (see first item)

@lukpueh lukpueh added legacy Issues related to legacy interfaces (obsolete with #731) and removed low-prio labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy Issues related to legacy interfaces (obsolete with #731)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant