Add ErrCertificateNotFound

This commit is contained in:
Adnan Maolood
2020-10-31 16:45:38 -04:00
parent 14ef3be6fe
commit ca8e0166fc
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ func (c *CertificateStore) Add(scope string, cert tls.Certificate) {
func (c *CertificateStore) Lookup(scope string) (*tls.Certificate, error) {
cert, ok := c.store[scope]
if !ok {
return nil, ErrCertificateUnknown
return nil, ErrCertificateNotFound
}
// Ensure that the certificate is not expired
if cert.Leaf != nil && cert.Leaf.NotAfter.Before(time.Now()) {