aboutsummaryrefslogtreecommitdiffstats
path: root/acme-slave
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-12-08 19:50:09 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-12-08 21:08:19 +0100
commitf23e4e0d0cf48153dbc5134cf1bf1bb7189c3005 (patch)
tree004f1228cfd1992c82827f7674b4e1ee644148eb /acme-slave
parent450eff3c5ff16321d0675c1e2c22f5f85aaf6524 (diff)
Various fixes.
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;