From 109fc3fda97298b0d51345983dfde4ffaeea6109 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 16 Apr 2020 20:10:32 +0200 Subject: [PATCH] protocol: request validation with empty body MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit including the key authorization is deprecated and will be removed at some point, might as well clean that up now to be prepared. Signed-off-by: Fabian Grünbichler --- src/PVE/ACME.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/PVE/ACME.pm b/src/PVE/ACME.pm index c2756b6..4a05024 100644 --- a/src/PVE/ACME.pm +++ b/src/PVE/ACME.pm @@ -46,7 +46,7 @@ my $LETSENCRYPT_STAGING = 'https://acme-staging-v02.api.letsencrypt.org/director # b) # pick $challenge from $authorization->{challenges} according to desired type # c) my $key_auth = $acme->key_authorization($challenge->{token}); # d) # setup challenge validation according to specification -# e) $acme->request_challenge_validation($challenge->{url}, $key_auth); +# e) $acme->request_challenge_validation($challenge->{url}); # f) # poll $acme->get_authorization($auth_url) until status is 'valid' # 5) # generate CSR in PEM format # 6) $acme->finalize_order($order, $csr); @@ -485,11 +485,9 @@ sub revoke_certificate { # call after validation has been setup # returns (potentially updated) challenge object sub request_challenge_validation { - my ($self, $url, $key_authorization) = @_; + my ($self, $url) = @_; - my $req = { keyAuthorization => $key_authorization }; - - my $r = $self->do(POST => $url, $req); + my $r = $self->do(POST => $url, {}); my $return = eval { __get_result($r, 200); }; $self->fatal("POST to '$url' failed - $@", $r) if $@; return $return; -- 2.39.2