projects
/
monkeysphere.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4fcff76
)
stupid perl flailing in pem2openpgp.
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Wed, 4 Feb 2009 02:36:07 +0000
(21:36 -0500)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Wed, 4 Feb 2009 02:36:07 +0000
(21:36 -0500)
src/keytrans/pem2openpgp
patch
|
blob
|
history
diff --git
a/src/keytrans/pem2openpgp
b/src/keytrans/pem2openpgp
index 0910d07f8b27009d31c315e1a781a82f9813eefd..61ce00f0d1b2fe6cd1a145248a8db3ad29d575ac 100755
(executable)
--- a/
src/keytrans/pem2openpgp
+++ b/
src/keytrans/pem2openpgp
@@
-352,14
+352,17
@@
my $hash_algo = pack('C', $digests->{sha1});
# could an environment variable (if set) override the current time, to
# be able to create a standard key? If we read the key from a file
# instead of stdin, should we use the creation time on the file?
# could an environment variable (if set) override the current time, to
# be able to create a standard key? If we read the key from a file
# instead of stdin, should we use the creation time on the file?
-my $timestamp = $ENV{PEM2OPENPGP_TIMESTAMP};
-if (! defined $timestamp)
+my $timestamp = 0;
+if (defined $ENV{PEM2OPENPGP_TIMESTAMP}) {
+ $timestamp = ($ENV{PEM2OPENPGP_TIMESTAMP} + 0);
+} else {
$timestamp = time();
$timestamp = time();
+}
my $flags = 0;
my $flags = 0;
-if (! defined $ENV{PEM2OPENPGP_USAGE_FLAGS})
+if (! defined $ENV{PEM2OPENPGP_USAGE_FLAGS})
{
$flags = $usage_flags->{authenticate};
$flags = $usage_flags->{authenticate};
-else {
+
}
else {
my @ff = split(",", $ENV{PEM2OPENPGP_USAGE_FLAGS});
foreach $f (@ff) {
if (! defined $usage_flags->{$f})
my @ff = split(",", $ENV{PEM2OPENPGP_USAGE_FLAGS});
foreach $f (@ff) {
if (! defined $usage_flags->{$f})