[Pgp-tools-commit] r476 - in trunk: caff debian

Peter Palfrader weasel at alioth.debian.org
Sat Jul 31 11:36:00 UTC 2010


Author: weasel
Date: 2010-07-31 11:35:57 +0000 (Sat, 31 Jul 2010)
New Revision: 476

Modified:
   trunk/caff/caff
   trunk/debian/changelog
Log:
caff: Make importing of keys to be signed from the normal gpg optional (--keys-from-gnupg)

Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff	2010-07-31 11:35:46 UTC (rev 475)
+++ trunk/caff/caff	2010-07-31 11:35:57 UTC (rev 476)
@@ -90,6 +90,10 @@
 
 Import keys from file. Can be supplied more than once.
 
+=item B<--keys-from-gnupg> I<file>
+
+Try to import keys from your standard GnuPG keyrings.
+
 =back
 
 =head1 FILES
@@ -1039,11 +1043,13 @@
 sub import_keys_to_sign() {
 	# Check if we can find the gpg key from our normal gnupghome, and then
 	# try to import it into our working gnupghome directory
-	foreach my $keyid (@KEYIDS) {
-		if (!import_key_from_user_gnupghome($keyid, $GNUPGHOME)) {
-			info("Key $keyid imported from your normal GnuPGHOME.");
+	if ($CONFIG{'keys-from-gnupg'}) {
+		foreach my $keyid (@KEYIDS) {
+			if (!import_key_from_user_gnupghome($keyid, $GNUPGHOME)) {
+				info("Key $keyid imported from your normal GnuPGHOME.");
+			}
 		}
-	}
+	};
 
 	# Import user specified key files
 	foreach my $keyfile (@{$CONFIG{'key-files'}}) {
@@ -1077,6 +1083,7 @@
 	'-S'              =>  \$params->{'no-sign'},
 	'--no-sign'       =>  \$params->{'no-sign'},
 	'--key-file=s@'   =>  \$params->{'key-files'},
+	'--keys-from-gnupg' =>  \$params->{'keys-from-gnupg'},
 	)) {
 	usage(\*STDERR, 1);
 };
@@ -1096,6 +1103,8 @@
 $CONFIG{'no-mail'}     = $params->{'no-mail'}     if defined $params->{'no-mail'};
 $CONFIG{'mail'}        = $params->{'mail'}        if defined $params->{'mail'};
 
+$CONFIG{'keys-from-gnupg'} = $params->{'keys-from-gnupg'} if defined $params->{'keys-from-gnupg'};
+
 # If old 'no-mail' parameter, or if the 'mail' parameter is set to 'no'
 if ( defined $CONFIG{'no-mail'} || 
      ( defined $CONFIG{'mail'} && $CONFIG{'mail'}  eq 'no' ) ) {

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-07-31 11:35:46 UTC (rev 475)
+++ trunk/debian/changelog	2010-07-31 11:35:57 UTC (rev 476)
@@ -32,8 +32,10 @@
       keyrings we still need to import them (again) from any keyrings
       passed with --key-files - the keys there might be newer, containing
       new subkeys (for encryption), uids (for signing) or revocations.
+    + Make importing of keys to be signed from the normal gpg optional
+      (--keys-from-gnupg).
 
- -- Peter Palfrader <weasel at debian.org>  Sat, 31 Jul 2010 13:18:38 +0200
+ -- Peter Palfrader <weasel at debian.org>  Sat, 31 Jul 2010 13:30:54 +0200
 
 signing-party (1.1.3-1) unstable; urgency=low
 




More information about the Pgp-tools-commit mailing list