Skip to content

Commit

Permalink
Raise error when invalid cert is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Apr 24, 2024
1 parent 9fd22ff commit b42c093
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions signxml/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ def sign(

if isinstance(cert, (str, bytes)):
cert_chain = list(iterate_pem(cert))
if len(cert_chain) == 0:
raise InvalidInput("No PEM-encoded certificates found in string cert input data")
else:
cert_chain = cert # type: ignore

Expand Down

0 comments on commit b42c093

Please sign in to comment.