Commit graph

1022 commits

Author SHA1 Message Date
Brad Warren
b7024352cc Bump version to 5.7.0 2026-05-11 08:57:00 -07:00
Brad Warren
03b5cf3cb0
Release 5.6.0 2026-05-11 08:56:58 -07:00
Brad Warren
208ff18405
remove readthedocs requirements files (#10639)
as those with access can see
[here](https://github.com/certbot/certbot/security/dependabot),
dependabot recently got confused by our readthedocs.org.requirements.txt
files

my read of the situation looking at output like
[this](https://github.com/certbot/certbot/actions/runs/25448194392/job/74658002711#step:3:72)
is dependabot expects paths to local packages to be relative to the
requirements file while readthedocs wants them to relative to the root
of the repo. (i tested changing the paths to be relative to the
requirements file and [readthedocs was not
happy](https://app.readthedocs.org/projects/eff-certbot/builds/32592654/))

to deal with this, we could create a .github/dependabot.yaml file and
set
[exclude-paths](https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference#exclude-paths-),
but it strikes me as even simpler and cleaner to just remove these files
if possible

our use of these readthedocs.org.requirements.txt files dates back to
https://github.com/certbot/certbot/pull/261, long before readthedocs
added its .readthedocs.yaml files which we much more recently adopted in
https://github.com/certbot/certbot/pull/9762. inspired by the
suggestions at
https://github.com/readthedocs/readthedocs.org/issues/7258 to workaround
the lack of support for constraints files, i took the approach of
[customizing the build
process](https://docs.readthedocs.com/platform/stable/build-customization.html)

we luckily don't have to override any of the existing readthedocs build
steps. for reference, the build process is described
[here](https://docs.readthedocs.com/platform/stable/builds.html),
however, if you compare the readthedocs build logs from
[main](https://app.readthedocs.org/projects/eff-certbot/builds/32568259/)
and [this
branch](https://app.readthedocs.org/projects/eff-certbot/builds/32597332/),
you'll see they are essentially identical

in addition to the certbot build, i also triggered
[acme](https://app.readthedocs.org/projects/acme-python/builds/32597344/)
and
[dns-cloudflare](https://app.readthedocs.org/projects/certbot-dns-cloudflare/builds/32597347/)
builds from this branch which passed as well

i personally think we can get away with just one review on this PR, but
if the reviewer disagrees, by all means request a second one
2026-05-08 13:59:22 -07:00
ohemorange
6114144bd2
Merge pull request #10630 from certbot/lexicon-repin
Repin dependencies to pull in updated dns-lexicon, which contains the fix for OVH challenge deletion bug
2026-04-28 12:28:31 -07:00
Erica Portnoy
fc91823888 Bump version to 5.6.0 2026-04-07 09:38:18 -07:00
Erica Portnoy
82dda45352
Release 5.5.0 2026-04-07 09:38:17 -07:00
Will Greenberg
8ebbe24190 Bump version to 5.5.0 2026-03-10 10:47:29 -07:00
Will Greenberg
95c004cb96
Release 5.4.0 2026-03-10 10:47:28 -07:00
Erica Portnoy
1ee73eed10 Bump version to 5.4.0 2026-02-03 09:52:18 -08:00
Erica Portnoy
54a3078305
Release 5.3.0 2026-02-03 09:52:16 -08:00
Will Greenberg
e7c539d3e9
Deprecate functions using acme.crypto_util.Formatto be able to soon remove OpenSSL (#10485)
A few largely unused functions/types have been deprecated in our effort
to remove our pyOpenSSL dependency:
    * Deprecated: `certbot.crypto_util.get_sans_from_cert`
    * Deprecated: `certbot.crypto_util.get_names_from_cert`
    * Deprecated: `certbot.crypto_util.get_names_from_req`
* Deprecated: `certbot.crypto_util.import_csr_file` (and replaced by
`certbot.crypto_util.read_csr_file`)
    * Deprecated: `acme.crypto_util.Format`

`read_csr_file` now always returns a PEM formatted CSR, since that's
what was happening in practice, and therefore lets us stop having to
return a `Format`, so we will be able to stop importing it.

first half of #10433

---------

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2026-02-02 16:25:13 -08:00
ohemorange
b362109bf6
Fix certbot tests after updating pytest to 9.0.2 (#10545)
Fixes  #10518.

`tools/pinning/current/repin.sh` is not run; only pytest version is
updated. This is because `pypinning` had a bunch of syntax changes that
seem simply but I believe should be in a separate PR, which I think
should be done after this to collect all repin changes.

As discussed further in #10518, these issues were caused by pytest's
internalization of pytest-subtest, which had several implementation
changes.

To fix these, we simply no longer use subtest in the failing tests. The
test in acme is now parametrized instead, and the tests in apache only
ever had a single parameter.

To use parametrization in the acme test, I converted `DNSTest` from
unittest to pytest style, which was pretty straightforward. The only
note there is that while it would be nice to make `ec_secp384r1_key` a
fixture, you [can't use fixtures in
parameters](https://github.com/pytest-dev/pytest/issues/349). You could
use requests, but that seemed less clear and messier, because then you'd
be checking the value of the parameter and only sometimes loading it.
Could also make it a global variable, but that didn't really seem
necessary, as it's only called twice. Happy to consider other options,
not strongly tied to this one, just seemed nicest to me.
2026-02-02 12:13:24 -08:00
Jacob Hoffman-Andrews
bd7b64f1e7
Fix HTTP01.uri for IPv6 addresses (#10548)
IPv6 addresses in URLs should be enclosed in square brackets.

Note: I chose to fix this by parsing the identifier rather than changing
the method signature. The obvious choice to change the method signature
would be to take `messages.Identifier`. We could even do this backwards
compatibly by taking `str | messages.Identifier`. However, `messages`
imports `challenges`, so referencing `messages.Identifier` here would
require an import loop.

I also considered implementing a new method on, e.g.
messages.Authorization that would take a challenge as a parameter. But
this would be suboptimal because the `uri` method really is specific to
the http-01 challenge type, so it's nice to have it implemented only on
the relevant class.
2026-01-27 20:42:52 -08:00
Brad Warren
28abca467b
remove email address (#10533)
this is the followup from https://github.com/certbot/josepy/pull/254
doing the same thing on this repo

i personally don't think this PR needs two reviews
2026-01-07 19:03:03 +00:00
Brad Warren
9a2e508348 Bump version to 5.3.0 2025-12-03 11:48:10 -08:00
Brad Warren
1127ac1cd7
Release 5.2.1 2025-12-03 11:48:09 -08:00
Jacob Hoffman-Andrews
ada2c547cf
Add san module (#10478)
Contains san.DNSName, san.IPAddress, and a parent class san.SAN.

Split out from #10468 as a standalone PR. To see examples of how it's
intended to be used, please see that PR.

The constructor for DNSName incorporates the same validation done in
`enforce_domain_sanity`, and the tests from `enforce_domain_sanity` are
copied here as well. The goal is to delete `enforce_domain_sanity`
entirely as part of #10468.

In support of #10346.
2025-11-04 19:44:18 -08:00
ohemorange
2ec8320763
Add python 3.14 support (#10481)
fixes https://github.com/certbot/certbot/issues/10477. this is based on
the PR that did this for 3.13 at
https://github.com/certbot/certbot/pull/10164
2025-11-04 10:49:51 -08:00
Erica Portnoy
3683eb6cf4 Bump version to 5.2.0 2025-10-07 09:42:29 -07:00
Erica Portnoy
d97f2aefc3
Release 5.1.0 2025-10-07 09:42:28 -07:00
Brad Warren
33890ab7f3
deprecate make_self_signed_cert (#10466)
with https://github.com/certbot/certbot/pull/10465,
make_self_signed_cert is no longer used outside of our tests so let's
move it there and remove it from our public API
2025-09-30 07:16:03 -07:00
Brad Warren
8ecd7fc23d Bump version to 5.1.0 2025-09-02 08:47:05 -07:00
Brad Warren
c307f62114
Release 5.0.0 2025-09-02 08:47:04 -07:00
ohemorange
d5dd8e47e1
Set up released packages minus dns plugins to use pyproject.toml (#10417)
Part of https://github.com/certbot/certbot/issues/10403.

As far as I can tell, "stick it in setup.py" is the official way of
handling complex dependencies. But since the version is static, we have
a little more choice here than we had with `certbot/pyproject.toml`.

We could put the version in the respective `pyproject.toml`s and read it
directly from the toml file with something like
[this](https://stackoverflow.com/a/78082561). Or otherwise load and
parse that file. The benefit of doing it that way is that all
non-certbot versions would be canonically in the `pyproject.toml`, and
also if we wanted we could use that same toml parsing to change the
version at release time instead of `sed`. I actually suspect `acme`,
`certbot-ci`, and `certbot-compatibility-test` will be the only ones
where we can completely delete `setup.py`, as the others all have
lockstep dependencies. (side note - we just never update `certbot-ci`
version. it's still set at `0.32.0.dev0`. there's no way this matters
but just noting.) I chose to do it this way instead because it seems
cleaner since we have to keep `setup.py` around anyway, but I don't have
a strong preference.

Based on what I've read, there's not actually a clean way to grab and
insert the version number within the toml file. This is due to [design
decisions](https://github.com/toml-lang/toml/issues/77) by the toml
authors. The clean `all` extras specification that we used in
`certbot/pyproject.toml` [seems to be an
outlier](https://github.com/pypa/setuptools/discussions/3627#discussioncomment-6476654)
because it's pip handling the self-reference, not toml.
2025-08-15 08:33:16 -07:00
ohemorange
49900b27d3
Update pinned oldest dependencies (#10420)
This is not necessarily the absolute minimum versions/pins we could use,
but it does get tests working. Fixes
https://github.com/certbot/certbot/issues/10418.

---------

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2025-08-14 16:37:10 -07:00
ohemorange
801894c7da
Speed up mac tests using various strategies (#10419)
Alternative to https://github.com/certbot/certbot/pull/10408/ and
https://github.com/certbot/certbot/pull/10415/ that fixes production
code for account meta and puts autouse fixtures in certbot and acme
tests. Overrides all `time.sleep` calls while we're at it.

Fixes the production code where it's simple/clean, and fixes the tests
for HTTPServer-based code because we just don't have that many mac users
using standalone.
2025-08-14 09:58:06 -07:00
ohemorange
5d05984dd9
remove python 3.9 support (#10406)
Fixes https://github.com/certbot/certbot/issues/10389. you can compare
this to the PR that did this for python 3.8 at
https://github.com/certbot/certbot/pull/10077

additional changes:
- linux-py310 test is removed from extended tests, since it's now run in
standard tests. additionally, openssl will never be < 1.1.1 now, due to
https://peps.python.org/pep-0644/.
- `letstest/scripts/test_openssl_version.py` was testing functionality
that was removed in https://github.com/certbot/certbot/pull/10373 so it
was deleted

---------

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2025-08-12 17:49:02 +00:00
Brad Warren
dd99dc30f2
use pep585 annotations in acme (#10407)
this is part of https://github.com/certbot/certbot/issues/10195 where i
posted [my general
plan](https://github.com/certbot/certbot/issues/10195#issuecomment-3176661347)
here

these changes were done automatically with the command:
```
ruff check --fix --extend-select UP006 --unsafe-fixes acme
```
2025-08-11 13:19:39 -07:00
ohemorange
dea3e5f1c4
Set up ruff so that test files have at least some linting (#10399)
Alternative implementation for #7908.

In this PR:
- set up ruff in CI (add to `tox.ini`, mark dep in `certbot/setup.py`)
- add a `ruff.toml` that ignores particularly annoying errors. I think
line length isn't actually necessary to set with this workflow since
we're not checking it but putting it there for future usage.
- either fix or ignore the rest of the errors that come with the default
linting configuration. fixed errors are mostly unused variables. ignored
are usually where we're doing weird import things for a specific reason.
2025-08-08 08:48:43 -07:00
ohemorange
5859e50e44
Run ruff to fix test errors (#10398)
This is mostly removing unused imports, plus one unused `import as`. Had
to put back imports being used with `eval` -- see the second commit.
2025-08-07 22:10:02 +00:00
ohemorange
f39a584db4
Remove SSLSocket and probe_sni (#10395)
Fixes https://github.com/certbot/certbot/issues/10381.

Also cleans out lingering unused OpenSSL references that I happened to
notice. I can move these to a different PR if requested.

Fixes https://github.com/certbot/certbot/issues/10079 as well.
```
$ git grep PKey
$ git grep "crypto.x509"
$ 
```

towncrier draft:
```
## 99.99.0 - 2025-08-05

### Changed

- Removed final instances of pyopenssl x509 and PKey objects
  * Removed `acme.crypto_util.SSLSocket`
  * Removed `acme.crypto_util.probe_sni`

  ([#10079](https://github.com/certbot/certbot/issues/10079),
  [#10381](https://github.com/certbot/certbot/issues/10381))
- Removed a number of deprecated classes/interfaces
  * Removed `acme.challenges.TLSALPN01Response`
  * Removed `acme.challenges.TLSALPN01`
  * Removed `acme.standalone.TLSServer`
  * Removed `acme.standalone.TLSALPN01Server`

  ([#10274](https://github.com/certbot/certbot/issues/10274))
```
2025-08-05 16:39:13 -07:00
Will Greenberg
15a145ac3f
acme: remove deprecated TLS-ALPN challenge functionality (#10378)
Fixes #10274

---------

Co-authored-by: ohemorange <erica@eff.org>
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
Co-authored-by: Brad Warren <bmw@eff.org>
2025-08-05 21:19:51 +00:00
Erica Portnoy
ffb2196e21 Bump version to 5.0.0 2025-08-05 08:58:17 -07:00
Erica Portnoy
832d11a63f
Release 4.2.0 2025-08-05 08:58:16 -07:00
Brad Warren
3d8be0c3b2
deprecate python 3.9 (#10390)
i based this PR on https://github.com/certbot/certbot/pull/10034/

this is maybe a little early since [python 3.9's EOL is in
october](https://devguide.python.org/versions/#supported-versions), but
i thought this would be good to do now to ensure we didn't forget, help
keep us on schedule when we're not releasing every month, allow us to
fix the security alert those with access can see at
https://github.com/certbot/certbot/security/dependabot which is caused
by [us (transitively) needing an old version of urllib3 with python
3.9](d80b1d395a/tools/requirements.txt (L195)),
and simplify development ever so slightly as discussed at
https://github.com/certbot/certbot/pull/10179

i created https://github.com/certbot/certbot/issues/10389 to track
dropping support entirely
2025-08-04 14:14:09 -07:00
ohemorange
d80b1d395a
Deprecate acme.crypto_util.probe_sni() (#10387)
Fixes #10386.

- Creates an internal version of `probe_sni` for
`certbot-compatibility-test` use
- Deprecates `acme.crypto_util.probe_sni()`
2025-08-04 08:08:45 -07:00
Brad Warren
1f128b0e0a
improve ARI error handling and logging (#10374)
fixes https://github.com/certbot/certbot/issues/10336 and fixes
https://github.com/certbot/certbot/issues/10357 using the plan at
https://github.com/certbot/certbot/issues/10336#issuecomment-3109192677

while this PR makes the renewal_time function slightly less nice, i
think us catching and handling the exceptions in certbot makes the most
sense so we can do exactly what we want around terminal and file logging

with this change, a output from a failed `sudo certbot renew` run looks
like
```
$ sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Processing /etc/letsencrypt/renewal/example.org.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
An error occurred requesting ACME Renewal Information (ARI). If this problem persists and you think it's a bug in Certbot, please open an issue at https://github.com/certbot/certbot/issues/new/choose.
Certificate not yet due for renewal

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
The following certificates are not due for renewal yet:
  /etc/letsencrypt/live/example.org/fullchain.pem expires on 2025-10-23 (skipped)
No renewals were attempted.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
```
`sudo certbot renew -q` produces no output and the relevant messages in
the log file look like:
```
2025-07-30 19:51:13,267:WARNING:certbot._internal.renewal:An error occurred requesting ACME Renewal Information (ARI). If this problem persists and you think it's a bug in Certbot, please open an issue at https://github.com/certbot/certbot/issues/new/choose.
2025-07-30 19:51:13,267:DEBUG:certbot._internal.renewal:Error while requesting ARI was:
Traceback (most recent call last):
  File "/home/brad/certbot/acme/src/acme/client.py", line 366, in renewal_time
    raise ValueError('im some error')
ValueError: im some error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/brad/certbot/certbot/src/certbot/_internal/renewal.py", line 351, in _ari_renewal_time
    return acme.renewal_time(cert_pem)[0]
  File "/home/brad/certbot/acme/src/acme/client.py", line 370, in renewal_time
    raise errors.ARIError(error_msg, now + default_retry_after) from e
acme.errors.ARIError: ('failed to fetch renewal_info URL https://acme-staging-v02.api.letsencrypt.org/acme/renewal-info/oXQaBm1Qt4YtSizBfrSNiElszRY.LMjTHFS4HPbSRMOzLrA9OZId', datetime.datetime(2025, 7, 31, 1, 51, 13, 267088))

```
2025-07-30 16:31:59 -07:00
Brad Warren
ae2a00bbad
prep for 4.2.0 and fix changelog (#10375)
something weird happened to the changelog in
https://github.com/certbot/certbot/pull/10319. a 4.2.0 entry was added
below the entry for `5.0.0 - main` despite 4.2.0 not having been
released. since it's sounding like we're expecting our next release to
be 4.2.0 and not 5.0, i merged these two changelog entries into one for
4.2.0

i also modified our setup.py files to use 4.2.0.dev0 instead of
5.0.0.dev0 altho this isn't strictly necessary because our release
script will automatically set all version numbers to whatever version we
give it on the command line before building the release
2025-07-29 14:44:39 -07:00
SATOH Fumiyasu
6ba8abe8d5
Remove the dependency on pytz (#10350)
The `pytz` is obsoleted by Python 3.9.
2025-07-28 08:00:16 -07:00
Brad Warren
57cb40ee9a
simplify request exception handling (#10363)
my desire to do this came from the discussion at
https://github.com/certbot/certbot/pull/10358#discussion_r2198273164

the code i'm deleting here came from
https://github.com/certbot/certbot/pull/4733

i think doing string parsing on the exception like this is convoluted
and overkill. i also agree with erica from the linked thread above that
we shouldn't be raising a ValueError here, especially when the docstring
for this function says `:raises requests.exceptions.RequestException: in
case of any problems` and doesn't mention ValueError

i prefer we do the simple thing and just delete the code. in the my
opinion unlikely event we decide polishing this important, i think we
can reconsider more complex approaches here
2025-07-17 12:07:00 -07:00
ldlb
295d8c3c49
Add --eab-hmac-alg parameter to support custom HMAC algorithm for EAB (#10319)
fixed: #10281
2025-06-27 14:16:38 -07:00
ohemorange
779ebe9085
Merge pull request #10341 from certbot/candidate-4.1.1
update files from 4.1.1 release
2025-06-12 13:40:50 -07:00
Brad Warren
4aaf9ccf59 Bump version to 5.0.0 2025-06-12 11:09:58 -07:00
Brad Warren
c93a261aad
Release 4.1.1 2025-06-12 11:09:57 -07:00
Brad Warren
9afb6415b8
fix up acme & certbot standalone code (#10293)
certbot's standalone code contains confusing references to things like
`SSLSocket` which we were hoping to deprecate in
https://github.com/certbot/certbot/issues/10284. are they relevant?
they're sure not!

certbot's standalone plugin only supports HTTP-01 so comments about
things like `ACMETLSServer` and the completely unused `certs` variable
can be deleted

furthermore, the type of the different variables named things like
`http_01_resources` were wrong in multiple places. as can be seen in
certbot's standalone code, the type is
`Set[acme_standalone.HTTP01RequestHandler.HTTP01Resource]`. this is also
[the type used in acme.standalone's
tests](723fe64d4d/acme/src/acme/_internal/tests/standalone_test.py (L78-L81))
despite the file's type annotations saying it takes a different type. i
think the incorrect type annotations were never caught because mypy
can't fully make sense of our overly complex server classes here

finally, `from __future__ import annotations` was added to make [forward
references in type
annotations](https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#forward-references)
easier
2025-06-12 11:09:12 -07:00
ohemorange
31599bad83
Reduce logging level of ARI failure to info (#10335)
This is a feature people didn't have before and won't miss if it fails.
We can always raise it later, but let's reduce it for now to stop people
worrying about the big red warning.
2025-06-12 16:16:57 +00:00
Erica Portnoy
4a1a136fcb Bump version to 5.0.0 2025-06-10 14:43:36 -07:00
Erica Portnoy
6a72811a39
Release 4.1.0 2025-06-10 14:43:35 -07:00
Brad Warren
95a70e98c2
don't check ARI for expired certs (#10317)
fixes https://github.com/certbot/certbot/issues/10308

my thinking here was if the spec forbids checking ARI for expired certs,
this check should happen directly in the renewal_time function. if we do
that, what's its most useful response? error? return None? return a
datetime in the past?

i feel the latter is most helpful. tell the caller to renew now rather
than erroring out or giving it no suggestion about when it should renew

it probably doesn't matter much, but i think this would be nice to have
for 4.1.0 as it fixes a (minor) spec compliance issue in our ARI
implementation that is being released
2025-06-06 10:52:54 -07:00
ohemorange
48f34938c6
Change acme.renewal_time to only check ARI, and not also a default time. Separate out default check and use that in should_autorenew instead. (#10309)
Fixes https://github.com/certbot/certbot/issues/10298. Replacement for
#10301.

---------

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2025-06-04 14:48:44 -07:00