aboutsummaryrefslogtreecommitdiff
path: root/provider.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-01-12 20:59:15 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-01-12 20:59:15 +0100
commitf249ea3e2595fdc0ffda3497b1c2c7546b87f6cc (patch)
treef5aea6ad248cc1adbe0901be63d0b515474d83b4 /provider.go
parent590982ab2f9f70dd59af19997e7888daa2a911bd (diff)
kiss
Diffstat (limited to 'provider.go')
-rw-r--r--provider.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/provider.go b/provider.go
index 0266281..d47a54c 100644
--- a/provider.go
+++ b/provider.go
@@ -188,22 +188,21 @@ func (p *Provider) Register(s Signer, c Contacts) error {
return err
}
-func (p *Provider) solve(s ThumbSigner, ch Challenge) error {
- thumb, err := s.Thumb()
+func (p *Provider) solve(s Signer, ch Challenge) error {
+ thumb, err := s.Thumb(ch.Token)
if err != nil {
return err
}
- ka := ch.Token + "." + thumb
r := &Challenge{
Resource: ResChallenge,
Type: ch.Type,
- KeyAuthorization: ka,
+ KeyAuthorization: thumb,
}
ns, err := p.postJson(ch.URI, s, r)
if err != nil {
return err
}
- err = ch.Solve(ch.Token, ka)
+ err = ch.Solve(ch.Token, thumb)
if err != nil {
return err
}
@@ -218,7 +217,7 @@ func (p *Provider) solve(s ThumbSigner, ch Challenge) error {
return nil
}
-func (p *Provider) Authorize(s ThumbSigner, d *Desire) error {
+func (p *Provider) Authorize(s Signer, d *Desire) error {
for _, domain := range d.altnames {
r := &Authorization{
Resource: ResNewAuthz,