python-tuf/tuf
Martin Vrachev 896e552fd7 sign sslib.exceptions -> UnsignedMetadataError
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>
2022-01-27 17:31:02 +02:00
..
api sign sslib.exceptions -> UnsignedMetadataError 2022-01-27 17:31:02 +02:00
client legacy client: Remove dead code 2021-10-13 15:59:56 +03:00
ngclient ngclient: simplify storing a downloaded file 2022-01-27 16:15:11 +02:00
scripts updated docs and comments 2021-07-14 10:37:08 +03:00
__init__.py Prepare v0.20.0 2021-12-15 16:36:50 +02:00
ATTACKS.md doc: remove duplicate outdated docs 2022-01-13 17:02:53 +01:00
developer_tool.py Address Pylint new unspecified-encoding warning 2021-08-23 16:48:40 +03:00
download.py Remove future module #1297 2021-04-11 11:37:45 +02:00
exceptions.py Make SlowRetrievalError parameter optional 2021-08-27 11:54:45 +03:00
formats.py updated docs and comments 2021-07-14 10:37:08 +03:00
keydb.py Remove some uses of "global" 2021-09-17 19:15:06 +03:00
log.py Address mypy warnings 2021-11-24 20:50:10 +02:00
mirrors.py Remove future module #1297 2021-04-11 11:37:45 +02:00
py.typed Advertize type annotations with py.typed 2021-11-11 22:34:22 +02:00
README-developer-tools.md Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
README.md Link to CLI.md from getting started and readme docs 2018-02-06 17:00:24 -05:00
repository_lib.py Add 'ecdsa' to the list of supported key types 2021-06-17 11:48:30 +03:00
repository_tool.py Update links to account for repository rename 2021-09-01 11:15:33 +01:00
requests_fetcher.py Remove use of six 2021-04-09 14:07:44 +03:00
roledb.py Remove some uses of "global" 2021-09-17 19:15:06 +03:00
settings.py Remove future module #1297 2021-04-11 11:37:45 +02:00
sig.py Remove future module #1297 2021-04-11 11:37:45 +02:00
unittest_toolbox.py Address mypy warnings 2021-11-24 20:50:10 +02:00