- if ($self->_httpCheck(
- # Well known uri
- 'http://'.$_.'/.well-known/acme-challenge/'.$self->{challenges}{$_}{http_token},
- # token.thumbprint
- $self->{challenges}{$_}{http_token}.'.'.$self->{account}{thumbprint}
- )) {
- # Post challenge request
- my $res = $self->_post($self->{challenges}{$_}{http_uri}, {resource => 'challenge', keyAuthorization => $self->{challenges}{$_}{http_token}.'.'.$self->{account}{thumbprint}});
-
- # Handle error
- unless ($res->is_success) {
- confess 'POST '.$self->{challenges}{$_}{http_uri}.' failed: '.$res->status_line;
- }
-
- # Extract content
- my $content = decode_json($res->content);
-
- # Save status
- $self->{challenges}{$_}{status} = $content->{status};
-
- # Add challenge uri to poll
- #XXX: in case it is still pending
- if ($content->{status} eq 'pending') {
- $self->{challenges}{$_}{http_challenge} = $content->{uri};
- }
- } else {
- # Set failed status
- $self->{challenges}{$_}{status} = 'invalid';
-
- # Display challenge to fix
- print STDERR 'Makes http://'.$_.'/.well-known/acme-challenge/'.$self->{challenges}{$_}{http_token}.' return '.$self->{challenges}{$_}{http_token}.'.'.$self->{account}{thumbprint}."\n";
- }
+# if ($self->_httpCheck(
+# # Well known uri
+# 'http://'.$_.'/.well-known/acme-challenge/'.$self->{challenges}{$_}{http_token},
+# # token.thumbprint
+# $self->{challenges}{$_}{http_token}.'.'.$self->{account}{thumbprint}
+# )) {
+# # Post challenge request
+# my $res = $self->_post($self->{challenges}{$_}{http_uri}, {resource => 'challenge', keyAuthorization => $self->{challenges}{$_}{http_token}.'.'.$self->{account}{thumbprint}});
+#
+# # Handle error
+# unless ($res->is_success) {
+# confess 'POST '.$self->{challenges}{$_}{http_uri}.' failed: '.$res->status_line;
+# }
+#
+# # Extract content
+# my $content = decode_json($res->content);
+#
+# # Save status
+# $self->{challenges}{$_}{status} = $content->{status};
+#
+# # Add challenge uri to poll
+# #XXX: in case it is still pending
+# if ($content->{status} eq 'pending') {
+# $self->{challenges}{$_}{http_challenge} = $content->{uri};
+# }
+# } else {
+# # Set failed status
+# $self->{challenges}{$_}{status} = 'invalid';
+#
+# # Display challenge to fix
+# print STDERR 'Makes http://'.$_.'/.well-known/acme-challenge/'.$self->{challenges}{$_}{http_token}.' return '.$self->{challenges}{$_}{http_token}.'.'.$self->{account}{thumbprint}."\n";
+# }