use the environment to determine usage flags (default to certify)
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 4 Feb 2009 02:42:06 +0000 (21:42 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 4 Feb 2009 02:42:06 +0000 (21:42 -0500)
src/keytrans/pem2openpgp

index 1aae4fec805467a814c24a33c8320a863720858a..315a2b5dc5a95638f5a031679f00f8c77b3c2d0c 100755 (executable)
@@ -361,7 +361,7 @@ if (defined $ENV{PEM2OPENPGP_TIMESTAMP}) {
 
 my $flags = 0;
 if (! defined $ENV{PEM2OPENPGP_USAGE_FLAGS}) {
-  $flags = $usage_flags->{authenticate};
+  $flags = $usage_flags->{certify};
 } else {
   my @ff = split(",", $ENV{PEM2OPENPGP_USAGE_FLAGS});
   foreach my $f (@ff) {
@@ -378,7 +378,7 @@ my $creation_time_packet = pack('CCN', 5, $subpacket_types->{sig_creation_time},
 # FIXME: HARDCODED: what if someone wants to select a different set of
 # usage flags?  For now, we do only authentication because that's what
 # monkeysphere needs.
-my $usage_packet = pack('CCC', 2, $subpacket_types->{usage_flags}, $usage_flags->{authenticate});
+my $usage_packet = pack('CCC', 2, $subpacket_types->{usage_flags}, $flags);
 
 
 # FIXME: HARDCODED: how should we determine how far off to set the