// Validate attempts to validate the challenge. Stores changes to the Challenge
// type using the DB interface.
// satisfactorily validated, the 'status' and 'validated' attributes are
// updated.
Validate attempts to validate the challenge. Stores changes to the Challenge
type using the DB interface.
satisfactorily validated, the 'status' and 'validated' attributes are
updated.
// Validate attempts to validate the challenge . Stores changes to the Challenge // type using the DB interface . // satisfactorily validated the ' status ' and ' validated ' attributes are // updated .
func (ch *Challenge) Validate(ctx context.Context, db DB, jwk *jose.JSONWebKey, vo *ValidateChallengeOptions) error {
	if ch.Status != StatusPending {
		return nil
	}
	switch ch.Type {
	case "http-01":
		return http01Validate(ctx, ch, db, jwk, vo)
	case "dns-01":
		return dns01Validate(ctx, ch, db, jwk, vo)
	case "tls-alpn-01":
		return tlsalpn01Validate(ctx, ch, db, jwk, vo)
	default:
		return NewErrorISE("unexpected challenge type '%s'", ch.Type)
	}
}
func ( ch * Challenge ) Validate ( ctx context . Context , db DB , jwk * jose . JSONWebKey , vo * ValidateChallengeOptions ) error { if ch . Status != StatusPending { return nil } switch ch . Type { case " " : return http01Validate ( ctx , ch , db , jwk , vo ) case " " : return dns01Validate ( ctx , ch , db , jwk , vo ) case " " : return tlsalpn01Validate ( ctx , ch , db , jwk , vo ) default : return NewErrorISE ( " " , ch . Type ) } }
Validate attempts to validate the challenge.
Validate attempts to validate the challenge .
// If already valid or invalid then return without performing validation.