forked from TrueCloudLab/lego
feat: removes AddPreCheck function.
This commit is contained in:
parent
53c02b6d5e
commit
1bdab236ea
1 changed files with 0 additions and 17 deletions
|
@ -1,7 +1,6 @@
|
||||||
package dns01
|
package dns01
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -24,22 +23,6 @@ func WrapPreCheck(wrap WrapPreCheckFunc) ChallengeOption {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddPreCheck Allow to define checks before notifying ACME that the DNS challenge is ready.
|
|
||||||
// Deprecated: use WrapPreCheck instead.
|
|
||||||
func AddPreCheck(preCheck PreCheckFunc) ChallengeOption {
|
|
||||||
// Prevent race condition
|
|
||||||
check := preCheck
|
|
||||||
return func(chlg *Challenge) error {
|
|
||||||
chlg.preCheck.checkFunc = func(_, fqdn, value string, _ PreCheckFunc) (bool, error) {
|
|
||||||
if check == nil {
|
|
||||||
return false, errors.New("invalid preCheck: preCheck is nil")
|
|
||||||
}
|
|
||||||
return check(fqdn, value)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func DisableCompletePropagationRequirement() ChallengeOption {
|
func DisableCompletePropagationRequirement() ChallengeOption {
|
||||||
return func(chlg *Challenge) error {
|
return func(chlg *Challenge) error {
|
||||||
chlg.preCheck.requireCompletePropagation = false
|
chlg.preCheck.requireCompletePropagation = false
|
||||||
|
|
Loading…
Reference in a new issue