Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ bin
*.rpm
test
.DS_Store
*.exe
10 changes: 10 additions & 0 deletions api/crl/crl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}