Don't use $_ unnecessarily
This commit is contained in:
parent
75d5b62473
commit
92c81596c8
@ -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
|
# Prepare some values derived from account key for the ACME protocol
|
||||||
sub b64 { encode_base64url(shift, '') =~ s/=//gr }
|
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 $?;
|
die 'cannot process account key' if $?;
|
||||||
|
|
||||||
my ($pub_hex, $pub_exp) =
|
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 = sprintf("%x", $pub_exp);
|
||||||
$pub_exp = "0$pub_exp" if length($pub_exp) % 2;
|
$pub_exp = "0$pub_exp" if length($pub_exp) % 2;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user