Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails when renewing self-signed cert #141

Open
hryamzik opened this issue Apr 30, 2020 · 8 comments
Open

Fails when renewing self-signed cert #141

hryamzik opened this issue Apr 30, 2020 · 8 comments

Comments

@hryamzik
Copy link

I create a self-signed cert to let nginx start:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out fullchain.pem -days 365 -nodes -subj "/CN=example.com"

simp_le fails with the following message:

Not enough PEM encoded messages were found in fullchain.pem; at least 2 were expected, found 1.
@buchdag
Copy link
Contributor

buchdag commented Apr 30, 2020

Hi.

simp_le was never ever designed to work with self signed cert.

@hryamzik
Copy link
Author

just ignore it if it's not valid. I can't start web server without a cert, I can't issue a cert without a web server.

@zenhack
Copy link
Owner

zenhack commented Apr 30, 2020

I can't imagine a self signed cert would actually work for bootstrapping anyway -- I would expect the ACME server to complain and refuse to connect.

@hryamzik
Copy link
Author

It doesn't care. I've used this approach since letsencrypt was introduced.

As a workaround I've added rm -v fullchain.pem before first simp_le run and everything worked as expected.

@zenhack
Copy link
Owner

zenhack commented Apr 30, 2020

I suppose I don't have an objection to simp_le just issuing a warning in this case. I'd be willing to accept a patch that changed the behavior.

@buchdag
Copy link
Contributor

buchdag commented Apr 30, 2020

I think the issue here might be that simp_le expects the certificate and the intermediate in fullchain.pem (the two PEM encoded messages it alludes to).

It doesn't care.

I confirm that, ACME does not validate certificates to avoid being locked with an expired one that can't be renewed.

@buchdag
Copy link
Contributor

buchdag commented May 2, 2020

@hryamzik could you try replacing -out fullchain.pem with -out cert.pem in your openssl command ?

@hryamzik
Copy link
Author

hryamzik commented May 4, 2020

it's just the filename. And if I point nginx to cert.pem it won't get a full chain. when letsencrypt cert is generated.

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

No branches or pull requests

3 participants