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

Provide example showing how to save and load existing certificates #153

Closed
cowwoc opened this issue Feb 22, 2024 · 2 comments
Closed

Provide example showing how to save and load existing certificates #153

cowwoc opened this issue Feb 22, 2024 · 2 comments

Comments

@cowwoc
Copy link

cowwoc commented Feb 22, 2024

Given that most (all?) ACME servers do not support listing existing certifications, please clarify how we are supposed to create a Certificate object without placing an Order with the ACME server.

We need to know what information needs to be saved, and how to use this information to construct a Certificate at a later time.

@shred
Copy link
Owner

shred commented Feb 22, 2024

Please see the answer I gave in issue 146: #146 (comment)

You need to store the certificate location somewhere.

Certificate cert = // the certificate that was freshly created
URL certLocation = cert.getLocation();
// store certLocation somewhere

To reconstruct the Certificate instance from that location, bind it to a Login:

Login login = // your login
URL certLocation = // certLocation that was stored

Certificate cert = login.bindCertificate(certLocation);

@cowwoc
Copy link
Author

cowwoc commented Feb 27, 2024

Works for me. Thank you.

@cowwoc cowwoc closed this as completed Feb 27, 2024
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