1
0
Fork 0

check if defaultcertificate is defined in store

This commit is contained in:
Daniel Tomcej 2021-07-19 01:58:14 -06:00 committed by GitHub
parent 2a2f7f783f
commit 8d4620dc53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View file

@ -191,6 +191,10 @@ func (p *Provider) loadFileConfig(ctx context.Context, filename string, parseTem
// TLS stores
if len(configuration.TLS.Stores) > 0 {
for name, store := range configuration.TLS.Stores {
if store.DefaultCertificate == nil {
continue
}
content, err := store.DefaultCertificate.CertFile.Read()
if err != nil {
log.FromContext(ctx).Error(err)