Skip to content

don't use snakeoil certs in nginx - #10465

Merged
ohemorange merged 4 commits into
mainfrom
no-nginx-snakeoil
Sep 25, 2025
Merged

ohemorange merged 4 commits into
mainfrom
no-nginx-snakeoil

Conversation

@bmw

@bmw bmw commented Sep 25, 2025 •

Copy link
Copy Markdown
Member

this PR finally removes all uses of self-signed certificates from certbot-nginx

i plan to create one last PR related to this deprecating acme.crypto_util.make_self_signed_cert and moving the function to certbot-compatibility-test which is the only place it's currently used

i think we could also do additional refactoring in certbot-nginx by moving the _make_server_ssl call out of choose_or_make_vhost and make deploy_cert responsible for calling it if the returned vhosts aren't ssl. in this case, we could then skip updating cert and key directives a second time as this is duplicate work if we just made the server ssl

i considered doing this, but it's a bigger refactor, breaks more tests, and i'm not sure it really buys us much so i skipped it. i could take this on or create an issue for it if you think it's important for us to do for some reason tho ohemorange

@bmw
bmw marked this pull request as ready for review September 25, 2025 18:18
@bmw
bmw requested a review from ohemorange September 25, 2025 18:18

@ohemorange ohemorange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

i think we could also do additional refactoring in certbot-nginx by moving the _make_server_ssl call out of choose_or_make_vhost and make deploy_cert responsible for calling it if the returned vhosts aren't ssl. in this case, we could then skip updating cert and key directives a second time as this is duplicate work if we just made the server ssl

i considered doing this, but it's a bigger refactor, breaks more tests, and i'm not sure it really buys us much so i skipped it. i could take this on or create an issue for it if you think it's important for us to do for some reason tho ohemorange

I don't think it's particularly important, although if you did want to do it I wouldn't be opposed. the duplicate work is a little silly but not much in the grand scheme of things, and at this point I feel the code is much clearer than before and agree that wouldn't be a significant improvement.

@ohemorange
ohemorange merged commit 513190a into main Sep 25, 2025
@ohemorange
ohemorange deleted the no-nginx-snakeoil branch September 25, 2025 19:41
@bmw

bmw commented Sep 25, 2025

Copy link
Copy Markdown
Member Author

thanks for your thoughts!

in that case, i think i won't worry about the additional refactoring in certbot-nginx here and just clean up the make_self_signed_cert function

bmw added a commit that referenced this pull request Sep 30, 2025
with #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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants