[Pgp-tools-commit] r668 - trunk/keyart
Aaron Toponce
atoponce-guest at moszumanska.debian.org
Wed Jun 18 21:54:44 UTC 2014
Author: atoponce-guest
Date: 2014-06-18 21:54:44 +0000 (Wed, 18 Jun 2014)
New Revision: 668
Modified:
trunk/keyart/keyart
Log:
exit if hex string is not a multiple of 8 bytes
Modified: trunk/keyart/keyart
===================================================================
--- trunk/keyart/keyart 2014-06-18 21:45:50 UTC (rev 667)
+++ trunk/keyart/keyart 2014-06-18 21:54:44 UTC (rev 668)
@@ -32,7 +32,7 @@
return gnupg
except OSError:
print "Please install GnuPG before using this script."
- sys.exit(4)
+ sys.exit(1)
def draw_art(key_size, key_algo, key_fpr):
"""Execute the Drunken Bishop algorithm on a key."""
@@ -243,6 +243,9 @@
size = None
algo = None
fpr = ARGS.fingerprint[0]
+ if len(fpr) % 8 != 0:
+ print "Hex string must be a multiple of 8 bytes."
+ sys.exit(2)
print draw_art(size, algo, fpr)
if ARGS.keyring:
@@ -255,7 +258,3 @@
cmd.append('--')
cmd.extend(ARGS.keyid)
gpg_cmd(cmd)
-
-
-
-
More information about the Pgp-tools-commit
mailing list