auto-ssl / auto-ssl/lua-resty-auto-ssl

Remove cached certificate

Open
#296 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
2k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

I've set up a server to auto generate certificates using Let's Encrypt and lua-resty-auto-ssl. It's working as expected for all but one domain, for which I am getting a privacy error in browser:

> NET::ERR_CERT_AUTHORITY_INVALID
> Subject: sni-support-required-for-valid-ssl
> Issuer: sni-support-required-for-valid-ssl
> Expires on: 17 Nov 2031
> Current date: 5 Mar 2024

In the past when I've had a similar error, for example due to an expired certificate I've been able to fix the problem by removing the certificate from the storage folder `/etc/resty-auto-ssl/storage/file` and restarting the openresty service with `sudo service openresty restart` to regenerate upon next visit.

In this case the above fix isn't working. I can't see any certificate for the domain under `/etc/resty-auto-ssl/letsencrypt/certs` and restarting the entire server hasn't worked, either.

It seems like the invalid certificate response has been cached and is being served, regardless of my attempts to remove it. Would anyone be able to point me in the right direction for why this might be occurring and how to resolve?

Can share my nginx.conf if needed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the nginx.conf setup alongside the certificate paths /etc/resty-auto-ssl/storage/file and /etc/resty-auto-ssl/letsencrypt/certs, then reproduce the behavior after sudo service openresty restart. Trace where the sni-support-required-for-valid-ssl response is selected and verify that the affected domain serves a regenerated valid certificate rather than the invalid cached response.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.