fix ocsp stapling always disabled
This commit is contained in:
parent
05e36e3136
commit
5b6bd07de8
7 changed files with 4 additions and 19 deletions
|
@ -153,6 +153,9 @@ func createMessage(certs map[string]*Certificate) dynamic.Message {
|
||||||
Certificate: traefiktls.Certificate{
|
Certificate: traefiktls.Certificate{
|
||||||
CertFile: traefiktls.FileOrContent(cert.Certificate),
|
CertFile: traefiktls.FileOrContent(cert.Certificate),
|
||||||
KeyFile: traefiktls.FileOrContent(cert.Key),
|
KeyFile: traefiktls.FileOrContent(cert.Key),
|
||||||
|
OCSP: traefiktls.OCSPConfig{
|
||||||
|
DisableStapling: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Stores: []string{tlsalpn01.ACMETLS1Protocol},
|
Stores: []string{tlsalpn01.ACMETLS1Protocol},
|
||||||
}
|
}
|
||||||
|
|
|
@ -781,9 +781,6 @@ func (p *Provider) buildMessage() dynamic.Message {
|
||||||
Certificate: traefiktls.Certificate{
|
Certificate: traefiktls.Certificate{
|
||||||
CertFile: traefiktls.FileOrContent(cert.Certificate.Certificate),
|
CertFile: traefiktls.FileOrContent(cert.Certificate.Certificate),
|
||||||
KeyFile: traefiktls.FileOrContent(cert.Key),
|
KeyFile: traefiktls.FileOrContent(cert.Key),
|
||||||
OCSP: traefiktls.OCSPConfig{
|
|
||||||
DisableStapling: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Stores: []string{cert.Store},
|
Stores: []string{cert.Store},
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,6 @@ func (c *connectCert) getLeaf() traefiktls.Certificate {
|
||||||
return traefiktls.Certificate{
|
return traefiktls.Certificate{
|
||||||
CertFile: traefiktls.FileOrContent(c.leaf.cert),
|
CertFile: traefiktls.FileOrContent(c.leaf.cert),
|
||||||
KeyFile: traefiktls.FileOrContent(c.leaf.key),
|
KeyFile: traefiktls.FileOrContent(c.leaf.key),
|
||||||
OCSP: traefiktls.OCSPConfig{
|
|
||||||
DisableStapling: false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -943,9 +943,6 @@ func buildTLSStores(ctx context.Context, client Client) (map[string]tls.Store, m
|
||||||
tlsStore.DefaultCertificate = &tls.Certificate{
|
tlsStore.DefaultCertificate = &tls.Certificate{
|
||||||
CertFile: tls.FileOrContent(cert),
|
CertFile: tls.FileOrContent(cert),
|
||||||
KeyFile: tls.FileOrContent(key),
|
KeyFile: tls.FileOrContent(key),
|
||||||
OCSP: tls.OCSPConfig{
|
|
||||||
DisableStapling: false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1032,9 +1029,6 @@ func getTLS(k8sClient Client, secretName, namespace string) (*tls.CertAndStores,
|
||||||
Certificate: tls.Certificate{
|
Certificate: tls.Certificate{
|
||||||
CertFile: tls.FileOrContent(cert),
|
CertFile: tls.FileOrContent(cert),
|
||||||
KeyFile: tls.FileOrContent(key),
|
KeyFile: tls.FileOrContent(key),
|
||||||
OCSP: tls.OCSPConfig{
|
|
||||||
DisableStapling: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -1357,9 +1357,6 @@ func getTLS(k8sClient Client, secretName v1alpha2.ObjectName, namespace string)
|
||||||
Certificate: tls.Certificate{
|
Certificate: tls.Certificate{
|
||||||
CertFile: tls.FileOrContent(cert),
|
CertFile: tls.FileOrContent(cert),
|
||||||
KeyFile: tls.FileOrContent(key),
|
KeyFile: tls.FileOrContent(key),
|
||||||
OCSP: tls.OCSPConfig{
|
|
||||||
DisableStapling: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -428,9 +428,6 @@ func getCertificates(ctx context.Context, ingress *networkingv1.Ingress, k8sClie
|
||||||
Certificate: tls.Certificate{
|
Certificate: tls.Certificate{
|
||||||
CertFile: tls.FileOrContent(cert),
|
CertFile: tls.FileOrContent(cert),
|
||||||
KeyFile: tls.FileOrContent(key),
|
KeyFile: tls.FileOrContent(key),
|
||||||
OCSP: tls.OCSPConfig{
|
|
||||||
DisableStapling: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,7 +209,7 @@ func (m *Manager) Get(storeName, configName string) (*tls.Config, error) {
|
||||||
if bestCertificate != nil {
|
if bestCertificate != nil {
|
||||||
err := bestCertificate.StapleOCSP()
|
err := bestCertificate.StapleOCSP()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithoutContext().Warnf("ocsp - error during stable: %w", err)
|
log.WithoutContext().Warnf("ocsp - error during staple: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return bestCertificate.Certificate, nil
|
return bestCertificate.Certificate, nil
|
||||||
|
|
Loading…
Reference in a new issue