diff options
author | Mark Adams <mark@markadams.me> | 2017-03-14 08:04:03 -0500 |
---|---|---|
committer | Mark Adams <mark@markadams.me> | 2017-03-14 10:43:58 -0500 |
commit | d04339de54fca44c09ae9105627ab4ae7e0abdb1 (patch) | |
tree | dcfdd94edb8d89b2222949ead86694a9e1720be8 /tox.ini | |
parent | 1710c1524c69c39dfece7a24b87179be5eeff217 (diff) | |
download | pyjwt-fix-key-errors.tar.gz |
Refactor error handling in Algorithm.prepare_key() methodsfix-key-errors
Our error handling in Algorithm.prepare_key() was previously weird and
kind of inconsistent. This change makes a number of improvements:
* Refactors RSA and ECDSA prepare_key() methods to reduce nesting and
make the code simpler to understand
* All calls to Algorithm.prepare_key() return InvalidKeyError (or a
subclass) or a valid key instance.
* Created a new InvalidAsymmetricKeyError class that is used to provide
a standard message when an invalid RSA or ECDSA key is used.
Diffstat (limited to 'tox.ini')
0 files changed, 0 insertions, 0 deletions