Skip to content

Inaccurate error message about encrypted PEM string #286

@lukpueh

Description

@lukpueh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    legacyIssues related to legacy interfaces (obsolete with #731)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions