summaryrefslogtreecommitdiff
path: root/src/keytrans
diff options
context:
space:
mode:
Diffstat (limited to 'src/keytrans')
-rwxr-xr-xsrc/keytrans/pem2openpgp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/keytrans/pem2openpgp b/src/keytrans/pem2openpgp
index 3492361..4e6ebe7 100755
--- 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);
}