diff options
-rwxr-xr-x | acme-tinier.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/acme-tinier.pl b/acme-tinier.pl index c34cce3..96424fa 100755 --- a/acme-tinier.pl +++ b/acme-tinier.pl @@ -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; |