aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client.go')
-rw-r--r--client.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/client.go b/client.go
index f8c5aab..170f007 100644
--- a/client.go
+++ b/client.go
@@ -216,11 +216,13 @@ func (c *Client) Authorize(a *Account, domain []string) error {
switch resp.StatusCode {
case http.StatusCreated:
for _, ch := range r.Challenges {
- if ch.Type == ChallengeHTTP {
+ if canSolve[ch.Type] {
+ t, _ := Thumb(ch.Token, a.PrivKey)
ans := &Challenge{
- Resource: ResChallenge,
- Type: ch.Type,
- Token: ch.Token,
+ Resource: ResChallenge,
+ Type: ch.Type,
+ Token: ch.Token,
+ KeyAuthorization: t,
}
_, err = c.post(ch.URI, a, ans)
}