diff --git a/.gitignore b/.gitignore index 6b0acf7a0..d5d4ddd81 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ bin *.rpm test .DS_Store +*.exe \ No newline at end of file diff --git a/api/crl/crl.go b/api/crl/crl.go index c2525c131..5325ed53b 100644 --- a/api/crl/crl.go +++ b/api/crl/crl.go @@ -89,5 +89,15 @@ func (h *Handler) Handle(w http.ResponseWriter, r *http.Request) error { return err } + // Check if a raw/binary format CRL is requested + // This allows CFSSL to be used as a CRL Distribution Point + isRaw := r.URL.Query().Get("raw") == "true" + if isRaw { + w.Header().Set("Content-Type", "application/pkix-crl") + //w.Header().Set("Content-Disposition", "attachment; filename=revoked.crl") + _, err = w.Write(result) + return err + } + return api.SendResponse(w, result) }