Commit Graph

45 Commits

Author SHA1 Message Date
Matthew Holt
ba418d86ad
go.mod: Upgrade acmez
This stores the account with the cert metadata
2024-08-08 12:42:12 -06:00
Mohammed Al Sahaf
6e96d7c4bb
downgrade minimum Go version (#289)
* downgrade minimum Go version

* Use latest zerossl

---------

Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2024-05-15 13:19:57 -06:00
Matthew Holt
c0c618654f
Fix inconsistency in go.mod
Not sure how that happened...
2024-05-07 09:52:31 -06:00
Matthew Holt
e5f9915e75
go.mod: Upgrade to acmez v2.0.1 2024-05-07 09:48:13 -06:00
Matt Holt
0e88b3eaa1
Initial implementation of ARI (#286)
* Initial implementation of ARI

* Enhance redundancy, robustness, and logging

* Improve ARI updating; integrate on-demand TLS; detect changed window
2024-05-07 09:46:03 -06:00
Matthew Holt
fa7161a1a8
go.mod: Upgrade to ACMEz v2.0.0 2024-04-23 15:57:28 -06:00
Matthew Holt
f7ea6fb698
Enhancements to make ZeroSSL issuer more usable in Caddy 2024-04-11 12:23:53 -06:00
Matthew Holt
74862ff45a
Upgrade acmez to v2 beta
Adds support for customizing NotBefore/NotAfter times of certs
2024-04-08 14:05:43 -06:00
Matt Holt
6095ab8069
Initial implementation of ZeroSSL API issuer (#279)
* Initial implementation of ZeroSSL API issuer

Still needs CA support for CommonName-less certs

* Accommodate ZeroSSL CSR requirements; fix DNS prop check

* Fix README example

* Fix comment
2024-04-08 10:59:55 -06:00
dependabot[bot]
1652b4f5f5
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#264)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 20:05:32 -07:00
dependabot[bot]
560847b904
Bump golang.org/x/net from 0.11.0 to 0.17.0 (#253)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.11.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 22:07:28 -06:00
Matthew Holt
93a28b732a
Make cache options updateable; new remove methods
These are useful for advanced applications (like Caddy) which would
like to remove certificates from the
cache in a controlled way, and operate the
cache with new settings while running.
2023-07-08 09:56:51 -06:00
Matthew Holt
dd8df32b42
go.mod: Upgrade dependencies 2023-06-20 13:33:14 -06:00
Matthew Holt
6670b5e1cc
Improve handshake logic
- Only load cert from storage (or manager) if allowed to do so  (fix #174)
- Sync cert loading so storage isn't stampeded (fix #185)
- Update dependencies
2023-05-05 20:26:50 -06:00
dependabot[bot]
3514797a52
Bump golang.org/x/net from 0.0.0-20220805013720-a33c5aa5df48 to 0.7.0 (#218)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220805013720-a33c5aa5df48 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 22:34:59 -07:00
dependabot[bot]
890fe65f86
Bump golang.org/x/text from 0.3.7 to 0.3.8 (#216)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-23 08:56:13 -07:00
Matthew Holt
2e8dd4496a
Upgrade a couple dependencies 2022-09-30 13:33:37 -06:00
Matthew Holt
93d9113bce
go.mod: Upgrade dependencies 2022-08-08 12:55:39 -06:00
Matthew Holt
56c70f3808
Update to Go 1.18; use any 2022-08-08 10:45:24 -06:00
Matthew Holt
8531018bf2
go.mod: Upgrade acmez to v1.0.4 2022-08-02 14:52:26 -06:00
Matt Holt
2d114193c3
storage: Require fs.ErrNotExist (fix #168) (#170)
Also stop using the deprecated io/ioutil package.
Update dependencies.
Update Go version in go.mod.
2022-03-07 11:11:20 -07:00
Matthew Holt
f83201861a
Update dependencies (fix #152) 2021-11-08 12:57:05 -07:00
Matthew Holt
d7578507c8
go.mod: acmez 1.0 (also minor tweaks to readme) 2021-08-26 14:51:56 -06:00
Matthew Holt
388f3ed4c5
Log errors between issuer attempts
See https://caddy.community/t/no-certificate-created-for-long-domain-name/12729/7?u=matt
2021-06-09 13:11:36 -06:00
Mohamed Akram
eba05a818e
go.mod: Update cpuid (#125) 2021-04-05 15:05:24 -06:00
Matthew Holt
7550222c4a
Conform to libdns relative record names convention
See https://github.com/libdns/libdns/issues/12
2021-02-24 11:46:02 -07:00
Matthew Holt
7271e2f615
Export access to global challenge info cache
Turns out this is needed when solving the HTTP challenge in Caddy, in certain situations.

This does not provide access to challenge info in distributed challenge storage (that would require a Config, and isn't exported anyway since it is handled internally).
2021-01-23 14:28:02 -07:00
Matthew Holt
7891c83082
Improve IDN support
Convert IDNs to ASCII when generating CSRs and accessing storage.
2021-01-04 15:42:49 -07:00
Matthew Holt
81657a2337
Lower max stack trace size
64 MB... what was I thinking?
2020-09-17 12:16:14 -06:00
Matthew Holt
81e76ea4e7
go.mod: Use latest acmez and libdns 2020-08-17 11:35:34 -06:00
Matthew Holt
10a8b5c723
go.mod: Use latest acmez (better log messages) 2020-08-10 16:06:24 -06:00
Matthew Holt
7d9dfc3fe6
Add DNS-01 solver implementation that uses acmez and libdns APIs
Before when we used lego as our ACME library, DNS solvers abounded in
the lego repository and they could be used directly. Our new acmez lib
is very lightweight, and "bring-your-own-solvers", let alone your own
DNS provider implementations.

DNS providers are implemented in libdns: https://github.com/libdns

This commit adds an implementation of acmez.Solver that solves the DNS
challenge using libdns providers.

Unlike the other solvers, this one is exported because it is not a
challenge type that is enabled by default, and there is more config
surface.

We borrowed some DNS utility functions and tests from the lego repo.

But this is a very lightweight implementation that has a much, much
simpler API and smaller footprint.
2020-07-30 14:07:04 -06:00
Matthew Holt
9cc43e5a88
go.mod: Update acmez 2020-07-29 19:47:20 -06:00
Matthew Holt
e6076585c0
Convert (most of the library) to structured logs (closes #19)
Logging is now configurable through setting the Logging field on the
various relevant struct types. This is a more useful, consistent, and
higher-performing experience with logs than the std lib logger we used
before.

This isn't a 100% complete transition because there are some parts of
the code base that don't have obvious or easy access to a logger.
They are mostly fringe/edge cases though, and most are error logs, so
you shouldn't see them under normal circumstances. They still emit to
the std lib logger, so it's not like any errors get hidden: they are
just unstructured until we find a way to give them access to a logger.
2020-07-29 19:38:12 -06:00
Matt Holt
b76b76abfc
Replace lego with ACMEz (close #71) (#78) 2020-07-27 16:50:41 -06:00
Matthew Holt
5ed364019b
Add nil check; recover from all goroutines 2020-05-12 09:28:56 -06:00
Matthew Holt
b9edcb838b
mholt/certmagic -> caddyserver/certmagic
And update dependencies
2020-03-06 18:05:05 -07:00
Matthew Holt
37e754b40c
Major refactor to improve performance, correctness, and extensibility
Breaking changes; thank goodness we're not 1.0 yet 😅 - read on!

This change completely separates ACME-specific code from the rest of the
certificate management process, allowing pluggable sources for certs
that aren't ACME.

Notably, most of Config was spliced into ACMEManager. Similarly, there's
now Default and DefaultACME.

Storage structure had to be reconfigured. Certificates are no longer in
the acme/ subfolder since they can be obtained by ways other than ACME!
Certificates moved to a new certificates/ subfolder. The subfolders in
that folder use the path of the ACME endpoint instead of just the host,
so that also changed. Be aware that unless you move your certs over,
CertMagic will not find them and will attempt to get new ones. That is
usually fine for most users, but for extremely large deployments, you
will want to move them over first.

Old certs path:
  acme/acme-staging-v02.api.letsencrypt.org/...

New certs path:
  certificates/acme-staging-v02.api.letsencrypt.org-directory/...

That's all for significant storage changes!

But this refactor also vastly improves performance, especially at scale,
and makes CertMagic way more resilient to errors. Retries are done on
the staging endpoint by default, so they won't count against your rate
limit. If your hardware can handle it, I'm now pretty confident that you
can give CertMagic a million domain names and it will gracefully manage
them, as fast as it can within internal and external rate limits, even
in the presence of errors. Errors will of course slow some things down,
but you should be good to go if you're monitoring logs and can fix any
misconfigurations or other external errors!

Several other mostly-minor enhancements fix bugs, especially at scale.
For example, duplicated renewal tasks (that continuously fail) will not
pile up on each other: only one will operate, under exponential backoff.

Closes #50 and fixes #55
2020-02-21 14:32:57 -07:00
Matthew Holt
782db9b26d
go.mod: Update lego 2020-01-08 21:18:44 -07:00
Matthew Holt
04eff1f819
go.mod: Use lego v3.1.0 2019-10-11 10:27:29 -06:00
Matthew Holt
925f85ac0e
go.mod: Update to lego v3.0.2 2019-09-12 16:18:25 -06:00
Matthew Holt
be4f86a2eb Refactor, simplify, and correct on-demand config; update README
The MaxObtain and other checks such as rate limiting were crippling to
some use cases at scale and incorrect if configs are short-lived; these
changes allow the user to implement their own rate limiting (and simply
limiting the number of certificates to obtain is a bad idea and
shouldn't be done) and to better enforce hostname whitelists for
on-demand config when the high-level functions are used
2019-06-20 18:48:07 -06:00
Matthew Holt
fe0876b1cb
mod: Update go-acme/lego to v2.5.0 2019-04-20 11:36:10 -06:00
David Schwartz
ee1543e2f2 use go-acme/lego (#31)
* use go-acme/lego

* Use master branch of go-lego/acme since v2.3.0 still has a dependency on xenolf/lego

* Use golangci-lint since gometalinter is depricated

* different way of installing golangci-lint for appveyor

* Removing golangci-lint from Appveyor because of https://github.com/client9/shlib/issues/13
2019-03-19 12:38:00 -06:00
Joël Gähwiler
3775ef65a1 Go module: go.mod and go.sum (#20) 2019-02-01 22:02:52 -07:00