Don't use $_ unnecessarily

This commit is contained in:
Přemysl Eric Janouch 2017-05-17 15:19:11 +02:00
parent 75d5b62473
commit 92c81596c8
Signed by: p
GPG Key ID: B715679E3A361BE6

View File

@ -21,11 +21,11 @@ my $acme_dir = $ENV{ACME_DIR} || die 'ACME_DIR not set';
# Prepare some values derived from account key for the ACME protocol
sub b64 { encode_base64url(shift, '') =~ s/=//gr }
$_ = `openssl rsa -in '$account_key' -noout -text`;
my $key_info = `openssl rsa -in '$account_key' -noout -text`;
die 'cannot process account key' if $?;
my ($pub_hex, $pub_exp) =
/modulus:\n\s+00:([a-f\d:\s]+?)\npublicExponent: (\d+)/m;
$key_info =~ /modulus:\n\s+00:([a-f\d:\s]+?)\npublicExponent: (\d+)/m;
$pub_exp = sprintf("%x", $pub_exp);
$pub_exp = "0$pub_exp" if length($pub_exp) % 2;