aboutsummaryrefslogtreecommitdiffstats
path: root/acme-slave
diff options
context:
space:
mode:
Diffstat (limited to 'acme-slave')
-rwxr-xr-xacme-slave8
1 files changed, 4 insertions, 4 deletions
diff --git a/acme-slave b/acme-slave
index ee39f8d..5ff9834 100755
--- a/acme-slave
+++ b/acme-slave
@@ -79,7 +79,7 @@ sub request($$;$) {
# ACME client
-# https://github.com/letsencrypt/acme-spec/blob/master/draft-barnes-acme.md
+# https://tools.ietf.org/html/draft-ietf-acme-acme-01
sub acme($$) {
my ($uri, $h) = @_;
@@ -119,7 +119,7 @@ if ($COMMAND eq 'new-reg') {
acme($RES{'new-reg'}, {
resource => 'new-reg',
- contact => [ map {"mailto:$_"} split(',', @ARGV) ],
+ contact => [ map {"mailto:$_"} @ARGV ],
agreement => $uri,
});
exit;
@@ -168,7 +168,7 @@ my @domains = do {
open my $fh1, '-|', @req, '-subject' or die "Can't run req(1ssl): $!";
my $subject = <$fh1>;
close $fh1;
- $domains{$1} = 1 if $subject =~ /\Asubject=\/CN=($RE_domain)(?:,.*)?\n\z/o;
+ $domains{$1} = 1 if $subject =~ /\Asubject=.*\/CN=($RE_domain)\n\z/o;
open my $fh2, '-|', @req, '-text', '-reqopt', 'no_header,no_version,no_subject,no_pubkey,no_sigdump'
or die "Can't run req(1ssl): $!";
@@ -224,7 +224,7 @@ foreach my $domain (@domains) {
for (my $i=0;; $i++) {
my $status = request('GET' => $challenge->{uri})->{status} // 'pending';
- die "Invalid challenge for $domain" if $status eq 'invalid';
+ die "Error: Invalid challenge for $domain\n" if $status eq 'invalid';
last if $status eq 'valid';
die "Timeout exceeded while waiting for challenge to pass ($domain)\n" if $i >= $TIMEOUT;
sleep 1;