Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signing issues should just throw a warning, not an exception #116

Merged
merged 1 commit into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions libpkpass/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from libpkpass.errors import EncryptionError, DecryptionError, SignatureCreationError, \
SignatureVerificationError, X509CertificateError
from libpkpass.errors import EncryptionError, DecryptionError, SignatureCreationError, X509CertificateError

##############################################################################
def handle_python_strings(string):
Expand Down Expand Up @@ -130,9 +129,6 @@ def pk_verify_signature(string, signature, identity):
proc = Popen(command, stdout=PIPE, stdin=PIPE, stderr=STDOUT)
stdout, _ = proc.communicate(input=base64.urlsafe_b64decode(handle_python_strings(signature)))

if proc.returncode != 0:
raise SignatureVerificationError(stdout)

return stdout.decode("ASCII") == stringhash


Expand Down
3 changes: 0 additions & 3 deletions libpkpass/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ class RSAKeyError(PKPassError):
class SignatureCreationError(PKPassError):
pass

class SignatureVerificationError(PKPassError):
pass

class TrustChainVerificationError(PKPassError):
pass

Expand Down