Traefik: Add OnDemand check in ACME

Created on 7 Mar 2017  路  3Comments  路  Source: traefik/traefik

If OnDemand is activated, check if new cert request is not already set in the manual config.

areacme kinenhancement statu5-frozen-due-to-age

Most helpful comment

Ehm, what exactly is the problem that is causing it and the solution to it? I have the probably same problem. Thanks.

All 3 comments

the current code is already returning the cert if present:

func (a *ACME) loadCertificateOnDemand(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) {
    domain := types.CanonicalDomain(clientHello.ServerName)
    account := a.store.Get().(*Account)
    if certificateResource, ok := account.DomainsCertificate.getCertificateForDomain(domain); ok {
        return certificateResource.tlsCert, nil
    }

As I'm in this part of code currently, let me know what you want to achive and I can help implementing it.

I'll close this issue, because I think the question is answered, but feel free to continue the conversation.

Ehm, what exactly is the problem that is causing it and the solution to it? I have the probably same problem. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JensErat picture JensErat  路  3Comments

f3l1x picture f3l1x  路  3Comments

rogeriollacerda picture rogeriollacerda  路  3Comments

ulm0 picture ulm0  路  3Comments

leowmjw picture leowmjw  路  3Comments