mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Catch Metadata.sign() securesystemslib exceptions and instead throw a more general UnsignedMetadataError exception. We don't want to expose securesystemslib exceptions and it's better to replace them with a more general exception that could be easily handled. As the signer is an argument implementing securesystemslib.signer.Signer interface we don't know what exception will it throw. That's why we need to catch all possible exceptions during signing and raise UnsignedMetadataError. That is the same reason why we should move the serialization outside the "try" block, so a tuf.api.serialization.SerializationError can propagate and warn the user that 'signed' cannot be serialized. Signed-off-by: Martin Vrachev <mvrachev@vmware.com> |
||
|---|---|---|
| .. | ||
| api | ||
| client | ||
| ngclient | ||
| scripts | ||
| __init__.py | ||
| ATTACKS.md | ||
| developer_tool.py | ||
| download.py | ||
| exceptions.py | ||
| formats.py | ||
| keydb.py | ||
| log.py | ||
| mirrors.py | ||
| py.typed | ||
| README-developer-tools.md | ||
| README.md | ||
| repository_lib.py | ||
| repository_tool.py | ||
| requests_fetcher.py | ||
| roledb.py | ||
| settings.py | ||
| sig.py | ||
| unittest_toolbox.py | ||