golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124k stars 17.67k forks source link

x/crypto/acme: provide mock implementation for tests #17251

Open rogpeppe opened 8 years ago

rogpeppe commented 8 years ago

Without faking out the whole of GetCertificate, it's not easy to test an autocert-based system, and doing things that way leaves substantial room for getting the Manager configuration wrong.

The autocert tests contain an ACME CA server stub - maybe that could be made available publicly in some form.

gopherbot commented 7 years ago

CL https://golang.org/cl/41731 mentions this issue.

x1ddos commented 7 years ago

Sorry that was wrong CL. But I'm definitely planning on fixing this one, too.

x1ddos commented 7 years ago

There's now https://github.com/letsencrypt/pebble, which is testing-oriented set of packages/mini implementation of the upcoming Let's Encrypt v2 endpoint. Might be useful.

gopherbot commented 6 years ago

Change https://golang.org/cl/125495 mentions this issue: acme/autocert: add support for tls-alpn-01