Skip to content

Commit

Permalink
Merge pull request #29 from oetiker/r/0.7.5
Browse files Browse the repository at this point in the history
fix challenge management
  • Loading branch information
oetiker authored Aug 12, 2020
2 parents 55e3794 + 0c670dd commit 6cbf3eb
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
5 changes: 4 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
2020-07-28 11:27:08 +0200 (HEAD -> v0.7.2, origin/v0.7.2, master) * remove v1 leftovers * improve error handling -- Tobias Oetiker
2020-08-03 08:47:41 +0200 (origin/v0.7.2, v0.7.2) better logging -- Tobias Oetiker
2020-07-28 16:35:54 +0200 fix version numbering -- Tobias Oetiker
2020-07-28 11:27:08 +0200 * remove v1 leftovers * improve error handling -- Tobias Oetiker
2020-07-05 11:57:35 +0000 challengeHandler is gone -- Dominik Hassler
2020-06-10 15:23:25 +0200 (tag: v0.7.1) support openssl 1.1 -- Tobias Oetiker
2020-02-11 22:44:10 +0100 build should honour sysconfdir (#24) -- Dominik Hassler
2019-07-12 13:48:49 +0200 Disclaimer added (#23) -- Samuel Amoser
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.4
0.7.5
24 changes: 15 additions & 9 deletions bin/acmefetch
Original file line number Diff line number Diff line change
Expand Up @@ -313,17 +313,23 @@ sub getCertificates {
my $order = $acme->create_order( identifiers => [
map { { type => 'dns', value => $_ } } sort keys %{$cert->{SITES}}
]);
my @authUrl = $order->authorizations;
my @id = $order->identifiers;
for my $i (0..$#authUrl){
bla 'debug',"## authorizing $authUrl[$i] ##";
my $authz = $acme->get_authorization($authUrl[$i]);
#my @authUrl = $order->authorizations;
# my @id = $order->identifiers;
#bla 'debug','auth'.Dumper(\@authUrl);
#bla 'debug','id'.Dumper(\@id);
URL:
for my $url ($order->authorizations){
my $authz = $acme->get_authorization($url);
my $site = $authz->identifier->{value};
bla 'debug','## checking '.$site.":\t".$authz->status;
next if $authz->status eq 'valid';
# bla 'debug', Dumper $authz;
my @challenges = $authz->challenges();
my $ok;
my $handler; # when the handler gets destroyed the authorization gets remoived too!
for my $challenge ($authz->challenges()){
for my $challenge (@challenges){
next unless $challenge->type eq 'http-01';
my $root = $cert->{SITES}{$id[$i]->{value}}{challengeConfig}{www_root};
my $root = $cert->{SITES}{$site}{challengeConfig}{www_root};
$handler = $challenge->create_handler($acme,$root);
$acme->accept_challenge($challenge);
$ok = 1;
Expand All @@ -335,12 +341,12 @@ sub getCertificates {
}
my $status;
while ($status = $acme->poll_authorization($authz)){
bla 'debug',"## waiting for authorization on ".$id[$i]->{value}." $status";
bla 'debug',"## waiting for authorization on $site - $status";
last if $status ne 'pending';
sleep 1;
}
if ($status eq 'invalid'){
bla 'info',"Failed to authorise $id[$i]->{value}. Probably something wrong with the configuration?";
bla 'info',"Failed to authorise $site. Probably something wrong with the configuration?";
bla 'info', Dumper($authz);
next SITE;
}
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for AcmeFetch 0.7.3.
# Generated by GNU Autoconf 2.69 for AcmeFetch 0.7.5.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='AcmeFetch'
PACKAGE_TARNAME='acmefetch'
PACKAGE_VERSION='0.7.3'
PACKAGE_STRING='AcmeFetch 0.7.3'
PACKAGE_VERSION='0.7.5'
PACKAGE_STRING='AcmeFetch 0.7.5'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -1295,7 +1295,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures AcmeFetch 0.7.3 to adapt to many kinds of systems.
\`configure' configures AcmeFetch 0.7.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1362,7 +1362,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of AcmeFetch 0.7.3:";;
short | recursive ) echo "Configuration of AcmeFetch 0.7.5:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1460,7 +1460,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
AcmeFetch configure 0.7.3
AcmeFetch configure 0.7.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1716,7 +1716,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by AcmeFetch $as_me 0.7.3, which was
It was created by AcmeFetch $as_me 0.7.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2583,7 +2583,7 @@ fi
# Define the identity of the package.
PACKAGE='acmefetch'
VERSION='0.7.3'
VERSION='0.7.5'
cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -5258,7 +5258,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by AcmeFetch $as_me 0.7.3, which was
This file was extended by AcmeFetch $as_me 0.7.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -5315,7 +5315,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
AcmeFetch config.status 0.7.3
AcmeFetch config.status 0.7.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion man/acmefetch.1
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ACMEFETCH 1"
.TH ACMEFETCH 1 "2020-07-28" "0.7.2" "AcmeFetch"
.TH ACMEFETCH 1 "2020-08-12" "0.7.5" "AcmeFetch"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
Expand Down

0 comments on commit 6cbf3eb

Please sign in to comment.