Closed dhannyz closed 5 years ago
What broke, exactly? The changes should have been internal...
This plugin calls methods that no longer seem to exist as they have been moved into certmagic.
# github.com/pieterlouw/caddy-net/caddynet/netserver
./tls.go:33:15: c.TLS.ObtainCert undefined (type *caddytls.Config has no field or method ObtainCert)
./tls.go:47:6: undefined: caddytls.HostQualifies
./tls.go:48:21: cfg.TLS.CacheManagedCertificate undefined (type *caddytls.Config has no field or method CacheManagedCertificate)
./tls.go:64:9: undefined: caddytls.RenewManagedCertificates
Should be easy fixes:
c.TLS.ObtainCert()
-> c.TLS.Manager.ObtainCert()
caddytls.HostQualifies()
-> certmagic.HostQualifies()
cfg.TLS.CacheManagedCertificate()
-> cfg.TLS.Manager.CacheManagedCertificate()
caddytls.RenewManagedCertificates
-> certCache.RenewManagedCertificates()
(you'll have to get the reference to the certificate cache in use -- see Caddy code for examples)Thanks for reporting @dhannyz and suggestions to fix it @mholt , will attend to it.
Hi @mholt ,
I've made the changes according to suggestions above ( see here ). However when I deploy the new plugin I get the following build errors from the build server:
netserver/tls.go:34:15: c.TLS.Manager undefined (type *caddytls.Config has no field or method Manager)
netserver/tls.go:49:21: cfg.TLS.Manager undefined (type *caddytls.Config has no field or method Manager)
Against which version of Caddy is the build server building on? The reason I ask is because if I switch my local Caddy build to tag v0.11.1 I get the same errors on my development box.
Pieter
Yeah I think it hasn't been released yet on the build server, sorry. It'll go out with the next Caddy release, as soon as I find some time. It's crunch-time on my thesis.
I'm not entirely sure if it's related to this issue, if I select the net
plugin on the Caddy download site right now, it fails to build.
So, Caddy 0.11.3 was released which should fix this, so you should be able to deploy the plugin.
A new, unrelated Caddy release is happening probably tomorrow, just FYI. I have a PR inbound in a few moments since there's one slight breaking change to the NewConfig function.
Okay, deploy away! :+1:
Hi, Latest version (0.1.4) of the plugin has been deployed. Thanks again for reporting @dhannyz and for the assistance @mholt .
Pieter
TLS setup calls need to change to suit @mholt 's new certmagic api