aboutsummaryrefslogtreecommitdiff
path: root/desire.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-01-21 21:24:57 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-01-21 21:24:57 +0100
commitd0cb3267a05fae23bf15adb2df80402f97f83cab (patch)
tree86e550d911e950ab6839e0970355de83a992545c /desire.go
parentac0883b44c37dac955c39e9c43b960201836da09 (diff)
Move picker into authz
Diffstat (limited to 'desire.go')
-rw-r--r--desire.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/desire.go b/desire.go
index 6c5a163..702cbcb 100644
--- a/desire.go
+++ b/desire.go
@@ -95,28 +95,3 @@ func (d *Desire) CSR() (string, error) {
}
return base64.RawURLEncoding.EncodeToString(der), nil
}
-
-func (d Desire) supported(c []Challenge, com []int) bool {
- for _, n := range com {
- if _, ok := d.solver[c[n].Type]; !ok {
- return false
- }
- }
- return true
-}
-
-func (d Desire) pick(a *Authorization) []Challenge {
- var c []Challenge
- for _, com := range a.Combinations {
- if d.supported(a.Challenges, com) {
- for _, n := range com {
- ch := a.Challenges[n]
- ch.Solver = d.solver[ch.Type]
- a.Challenges[n] = ch
- c = append(c, ch)
- }
- return c
- }
- }
- return c
-}