-
Notifications
You must be signed in to change notification settings - Fork 822
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
Automatic creation of default cert and private key #423
Conversation
And prepare functions for the default certificate test unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 🥇
Don't forget the documentation.
Under which section of the doc do you think this should go ? |
Feel free to choose. Just a little sentence to said that we can use default self-signed certificates. |
Travis is having network related issues since two days ago, might be a while before the tests finally succeed. |
This is a proposed fix for #411 (and the related #74 #373 #416 and #420).
This PR check at container startup if both
default.crt
anddefault.key
are present in/etc/nginx/certs
and create them otherwise. This auto-created certificate is self signed, has subject CN=letsencrypt-nginx-proxy-companion and is valid for 365 days.If the startup function detect a user provided default certificate and key (ie a certificate which subject does not match
letsencrypt-nginx-proxy-companion
), it won't overwrite it.If the startup function detect an auto-created certificate which remaining validity is less than three months, it will re-create a new one.
Some test units and functions had to be modified / expanded to take this new feature into account.
This feature comes with its own test unit.