Compare commits
2 Commits
2de3fb0ead
...
f6a9d5e312
| Author | SHA1 | Date | |
|---|---|---|---|
| f6a9d5e312 | |||
|
|
30268db4be |
@@ -38,6 +38,15 @@ func (s *CertificateService) ListCertificates(search string, limit int) ([]types
|
||||
Value: search,
|
||||
Operation: "LIKE",
|
||||
})
|
||||
} else {
|
||||
// EJBCA rejects an empty criteria list ("Invalid criteria value,
|
||||
// cannot be empty"). With no search term, default to listing active
|
||||
// certificates so GET /certs returns a useful result instead of 500.
|
||||
criteria = append(criteria, client.CertSearchCriterion{
|
||||
Property: "STATUS",
|
||||
Value: "CERT_ACTIVE",
|
||||
Operation: "EQUAL",
|
||||
})
|
||||
}
|
||||
|
||||
certs, err := s.client.SearchCertificates(&client.CertSearchRequest{
|
||||
|
||||
Reference in New Issue
Block a user