func GetCACRLPEMTXT(store *liftca.Store, r *ht.Request) *ht.Answer { ca, answer := ObtainCA(store, r) if answer != nil { return answer } revoked := store.GetRevokedChildren(ca.SerialNumber()) crl, err := ca.PEMCRL(revoked) if err != nil { return ht.Failure(err) } return ht.Read("text/plain", crl) }
func GetCACRLCER(store *liftca.Store, r *ht.Request) *ht.Answer { ca, answer := ObtainCA(store, r) if answer != nil { return answer } revoked := store.GetRevokedChildren(ca.SerialNumber()) crl, err := ca.DERCRL(revoked) if err != nil { return ht.Failure(err) } return ht.Read("application/pkix-crl", crl) }
func GetCRL(store *liftca.Store, r *ht.Request) *ht.Answer { ca, answer := ObtainCA(store, r) if answer != nil { return answer } revoked := store.GetRevokedChildren(ca.SerialNumber()) output := make([]string, len(revoked)) for i, e := range revoked { output[i] = strconv.FormatInt(e, 10) } return ht.JSONDocument(&JSONCRLResponse{ Self: CACRLURL(ca.SerialNumber()), SerialNumbers: output, }) }