summaryrefslogtreecommitdiff
path: root/src/leap/common/keymanager/gpg.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-23 20:50:02 -0300
committerdrebs <drebs@leap.se>2013-04-23 20:50:02 -0300
commit62b5a7798924188ba915a1c095917d8709e20ae7 (patch)
tree8a9357f100da498cdcdc4152aa35626bdef585c5 /src/leap/common/keymanager/gpg.py
parentb3ad976ec8aa64a00cc824dc57aa2135ab41deb6 (diff)
Refactor, fixes, add api, tests.
* Change KeyTypeWrapper to EncryptionScheme * Change OpenPGPWrapper to OpenPGPScheme * Add missing and standardized crypto API. * Add delete_key() * Fix put_key raw so it puts either public or private keys. * Fix gpg's is_encrypted() * Fix openpgp's safe callbacks so they return correctly. * Remove binascii because it generates invalid doc ids. * Add tests.
Diffstat (limited to 'src/leap/common/keymanager/gpg.py')
-rw-r--r--src/leap/common/keymanager/gpg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/common/keymanager/gpg.py b/src/leap/common/keymanager/gpg.py
index 5571ace..f3e6453 100644
--- a/src/leap/common/keymanager/gpg.py
+++ b/src/leap/common/keymanager/gpg.py
@@ -394,4 +394,4 @@ class GPGWrapper(gnupg.GPG):
@return: Whether data is encrypted to a key.
@rtype: bool
"""
- self.is_encrypted_asym() or self.is_encrypted_sym()
+ return self.is_encrypted_asym(data) or self.is_encrypted_sym(data)