aboutsummaryrefslogtreecommitdiffstats
path: root/acme-slave
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-12-09 00:44:06 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-12-09 00:44:06 +0100
commitd6037af25079ce0e0c151ae6d35b1cffd5a5c494 (patch)
tree8e9308b32d787dd9aceb7cc4a3e4768540c66846 /acme-slave
parent19121704c28393d3d97e4f1cd70c2055756aa931 (diff)
parent8eb679e08e08b4bb992c8d43f57c3458aab4cf1a (diff)
Merge branch 'master' into debian
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;