Skip to content

Commit

Permalink
v0.5.4 update - major bugfix, vast additions of informative exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rmlibre committed Dec 21, 2019
1 parent c032eaa commit 84a2560
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 126 deletions.
19 changes: 12 additions & 7 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ Minor Changes
Major Changes
-------------

- Fixed a major bug in ``decrypt()`` which miscategorized a fingerprint scraped
from a message as the sender's, when in fact it should be the recipient's.
Getting the sender's fingerprint requires successfully decrypting the
message & scraping the signature from inside if it exists. We do this
now, raising ``LookupError`` if the signature inside has no corresponding
public key in the package keyring.
- Added new ``auto_encrypt()`` method which follows after ``auto_decrypt()``
in allowing a user to attempt to encrypt a message to a recipient's
key using the value in the ``uid`` kwarg. If there's no matching key
Expand All @@ -90,14 +96,13 @@ Major Changes
not how verify works. Signatures are on the inside on encrypted
messages. So ``decrypt()`` should be used for those instead, it
throws if a signature is invalid on a message.
- ````
- A rough guide now exists for what exceptions mean, since we've given
names & messages to the most likely errors, and helper functions
to resolve them. Users can now expect to run into more than just
the in decript ``CalledProcessError``. Exceptions currently being
used include: ``LookupError``, ``PermissionError``, ``TypeError``,
``ValueError``, ``KeyError``, and ``FileNotFoundError``.

- Fixed a bug in ``decrypt()`` which miscategorized a fingerprint scraped
from a message as the sender's, when in fact it should be the recipient's.
Getting the sender's fingerprint requires successfully decrypting the
message & scraping the signature from inside if it exists. We do this
now, raising ``LookupError`` if there is a signature inside & the message
with a corresponding public key in the package keyring.
- ``ValueError`` raised in ``text_export()`` and ``sign()`` switched to
``TypeError`` as it's only raised when their ``secret`` or ``key``
kwargs, respectively, are not of type ``bool``.
Expand Down
Loading

0 comments on commit 84a2560

Please sign in to comment.