From: Fabian Grünbichler Date: Thu, 16 Apr 2020 18:10:32 +0000 (+0200) Subject: protocol: request validation with empty body X-Git-Url: https://git.proxmox.com/?p=proxmox-acme.git;a=commitdiff_plain;h=109fc3fda97298b0d51345983dfde4ffaeea6109 protocol: request validation with empty body 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 --- 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;