projects
/
monkeysphere.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e83267c
)
rewrite stdin slurping to match example in perldoc -f unpack.
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Sat, 28 Feb 2009 19:08:41 +0000
(14:08 -0500)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Sat, 28 Feb 2009 19:08:41 +0000
(14:08 -0500)
src/keytrans/pem2openpgp
patch
|
blob
|
history
diff --git
a/src/keytrans/pem2openpgp
b/src/keytrans/pem2openpgp
index 3492361ad37994655c53c5c7dee2cbc33d5863af..4e6ebe71a21f47d5ab7bfe4d3d6e3d94dc60e5e2 100755
(executable)
--- a/
src/keytrans/pem2openpgp
+++ b/
src/keytrans/pem2openpgp
@@
-509,12
+509,14
@@
sub pem2openpgp {
my $rsa;
+my $stdin;
if (defined $ENV{PEM2OPENPGP_NEWKEY}) {
$rsa = Crypt::OpenSSL::RSA->generate_key($ENV{PEM2OPENPGP_NEWKEY});
} else {
- # slurp in the entire stdin:
- undef $/;
- my $stdin = <STDIN>;
+ $stdin = do {
+ local $/; # slurp!
+ <STDIN>;
+ };
$rsa = Crypt::OpenSSL::RSA->new_private_key($stdin);
}