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

Does this package actually acquire and renew certs? #5

Open
bsutton opened this issue Dec 8, 2023 · 11 comments
Open

Does this package actually acquire and renew certs? #5

bsutton opened this issue Dec 8, 2023 · 11 comments

Comments

@bsutton
Copy link
Collaborator

bsutton commented Dec 8, 2023

As per the title or do you need to manage that separately?

@gmpassos
Copy link
Owner

gmpassos commented Dec 8, 2023

When invoking LetsEncrypt.startSecureServer with requestCertificate: true and checkCertificate: true, it triggers the acquisition of a new certificate if absent or expired. Refer to the documentation for more details. It's important to note that this process occurs solely during the server's startup.

(Indeed, there is a need for updating the documentation.)

Best regards.

@bsutton
Copy link
Collaborator Author

bsutton commented Dec 8, 2023 via email

@gmpassos
Copy link
Owner

gmpassos commented Dec 8, 2023

You can call:

https://pub.dev/documentation/shelf_letsencrypt/latest/shelf_letsencrypt/LetsEncrypt/checkCertificate.html

... with requestCertificate : true

And if it returns okRefreshed, you need to close the Server socket and re-open it.

@bsutton
Copy link
Collaborator Author

bsutton commented Dec 8, 2023 via email

@gmpassos
Copy link
Owner

gmpassos commented Dec 8, 2023

Please, let me know if it works well.

Any contributions in the form of documentation or examples would be greatly appreciated.

Best regards

@gmpassos
Copy link
Owner

gmpassos commented Dec 8, 2023

...

https://onepub.dev 👍

@bsutton
Copy link
Collaborator Author

bsutton commented Dec 8, 2023 via email

@gmpassos
Copy link
Owner

gmpassos commented Dec 8, 2023

I will be happy to review a PR. Just make it backward compatible.

Maybe startSecureServer (with the current parameters) should call your new function, with a better definition.

@bsutton
Copy link
Collaborator Author

bsutton commented Dec 8, 2023 via email

@bsutton
Copy link
Collaborator Author

bsutton commented Dec 15, 2023

For the moment I will leave this link here.

The handyman project demonstrates certificate renewal use a task scheduler that checks every hour if a cert needs to be renewed - renews the cert - and restarts the service with the new cert.

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

2 participants