From: Daniel Kahn Gillmor Date: Wed, 4 Feb 2009 02:42:06 +0000 (-0500) Subject: use the environment to determine usage flags (default to certify) X-Git-Tag: monkeysphere_0.23~129 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=6965f6fdde9c834b0dff32f406a5eaeba4acb722;p=monkeysphere.git use the environment to determine usage flags (default to certify) --- diff --git a/src/keytrans/pem2openpgp b/src/keytrans/pem2openpgp index 1aae4fe..315a2b5 100755 --- a/src/keytrans/pem2openpgp +++ b/src/keytrans/pem2openpgp @@ -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