[Pgp-tools-commit] r649 - trunk/keyart

Guilhem Moulin guilhem-guest at moszumanska.debian.org
Wed Jun 18 13:39:14 UTC 2014


Author: guilhem-guest
Date: 2014-06-18 13:39:14 +0000 (Wed, 18 Jun 2014)
New Revision: 649

Modified:
   trunk/keyart/keyart
Log:
keyart: prevent key files and key IDs to be interpreted as gpg options.

Modified: trunk/keyart/keyart
===================================================================
--- trunk/keyart/keyart	2014-06-18 13:39:10 UTC (rev 648)
+++ trunk/keyart/keyart	2014-06-18 13:39:14 UTC (rev 649)
@@ -23,7 +23,7 @@
     See https://bugs.g10code.com/gnupg/issue1640."""
     with open(os.devnull, 'wb') as devnull:
         cmd = (gpg_bin, '--quiet', '--yes', '--output', '/tmp/.0x%s.gpg' % keyid,
-               '--no-default-keyring', '--keyring=%s' % keyfile, '--export',
+               '--no-default-keyring', '--keyring=%s' % keyfile, '--export', '--',
                keyid)
         gpg = subprocess.Popen(cmd, stdout=devnull)
         gpg.communicate()
@@ -261,7 +261,7 @@
 
     if ARGS.id:
         for key in ARGS.id:
-            cmd = (gpg_bin, '--fingerprint', '--with-colons', key)
+            cmd = (gpg_bin, '--fingerprint', '--with-colons', '--', key)
             gpg = subprocess.Popen(cmd, stdout=subprocess.PIPE)
             for lines in gpg.communicate()[0].split('\n'):
                 colons = lines.split(':')
@@ -276,7 +276,7 @@
 
     if ARGS.file:
         for key in ARGS.file:
-            cmd = (gpg_bin, '--with-fingerprint', '--with-colons', key)
+            cmd = (gpg_bin, '--with-fingerprint', '--with-colons', '--', key)
             gpg = subprocess.Popen(cmd, stdout=subprocess.PIPE)
             cmd = ('grep', '-E', '^(pub|fpr)')
             grep = subprocess.Popen(cmd, stdin=gpg.stdout,




More information about the Pgp-tools-commit mailing list