]> git.proxmox.com Git - proxmox-acme.git/commitdiff
protocol: request validation with empty body
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 16 Apr 2020 18:10:32 +0000 (20:10 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 17 Apr 2020 07:44:09 +0000 (09:44 +0200)
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 <f.gruenbichler@proxmox.com>
src/PVE/ACME.pm

index c2756b650234cfb501d5f5a24b76d62bccfb4a68..4a05024ac4e0dba1d3bd7fc11ed968d229628557 100644 (file)
@@ -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
 # 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);
 # 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 {
 # 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;
     my $return = eval { __get_result($r, 200); };
     $self->fatal("POST to '$url' failed - $@", $r) if $@;
     return $return;