WithCertsOnly filters only those keys accompanied by a certificate.
()
| 53 | |
| 54 | // WithCertsOnly filters only those keys accompanied by a certificate. |
| 55 | func WithCertsOnly() AgentOption { |
| 56 | return func(o *options) { |
| 57 | o.filterBySignatureKey = func(k *agent.Key) bool { |
| 58 | _, err := ParseCertificate(k.Marshal()) |
| 59 | return err == nil |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // WithRemoveExpiredCerts will remove the expired certificates automatically. |
| 65 | func WithRemoveExpiredCerts(t time.Time) AgentOption { |
no test coverage detected
searching dependent graphs…