(ctx context.Context, wr http.ResponseWriter, req *http.Request)
| 86 | } |
| 87 | |
| 88 | func (auth *CertAuth) handleReject(ctx context.Context, wr http.ResponseWriter, req *http.Request) (string, bool) { |
| 89 | if auth.reject != nil { |
| 90 | return auth.reject.Validate(ctx, wr, req) |
| 91 | } |
| 92 | http.Error(wr, BAD_REQ_MSG, http.StatusBadRequest) |
| 93 | return "", false |
| 94 | } |
| 95 | |
| 96 | func (auth *CertAuth) Validate(ctx context.Context, wr http.ResponseWriter, req *http.Request) (string, bool) { |
| 97 | if req.TLS == nil || len(req.TLS.VerifiedChains) < 1 || len(req.TLS.VerifiedChains[0]) < 1 { |