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

How do I export domain TLS private key from ACMECLI? #72

Open
sensboston opened this issue Mar 21, 2023 · 3 comments
Open

How do I export domain TLS private key from ACMECLI? #72

sensboston opened this issue Mar 21, 2023 · 3 comments

Comments

@sensboston
Copy link

Hello, could you please suggest or provide a code snippet, how to export domain TLS private key used for certificate(s) generation, from console client ACMECLI?
For example, following this guide, it's a file domain.key , generated by command openssl genrsa 4096 > domain.key and used for command

openssl req -new -sha256 -key domain.key -subj "/" \
-reqexts SAN -config <(cat /etc/ssl/openssl.cnf \
<(printf "\n[SAN]\nsubjectAltName=DNS:foo.com,DNS:www.foo.com")) 

I've added some automation for ACMECLI (automatically passing file challenges by using FTP access to website/domain. If you want/need, I can create a pull request for that feature, it's really useful) and it works pretty fine, obtained certificate is good and valid, but FXDomains.com also requires a private key to install certificate.

So, for now I need to get it somehow in the text (not binary) form, could you help?

P.S. I'm very sorry, I definitely not a computer security & certificates expert so this area is pretty new for me.

@sensboston
Copy link
Author

sensboston commented Mar 22, 2023

You may close this question, I already figured out.

P.S. If someone interested in the automated ACMECLI, with Http01 challenge type (you need to provide your ftp account credentials in options, sample command file provided) and private key export in .pem format, you can download archive from https://senssoft.com/ACMECLI.zip

@qcjxberin
Copy link

@sensboston Can you provide the source code? Your compressed package file is actually effective

@sensboston
Copy link
Author

sensboston commented Oct 24, 2023

@qcjxberin, sure! I don't have time to create PR or diff, just use this source (for ACMECLI project): https://senssoft.com/Program.cs.zip
Don't forget to add FluentFTP package.

P.S. By the way, I did this mode just 'cause I've hosted on stupid FXDomains (it was a free hosting with domain name purchase), they have pretty limited access and I can't use a certbot. This year they cancelled free hosting and asked for some money, so I successfully migrated to the Oracle Cloud Always Free tier, installed certbot and forgot about free SSL cert problem at all 😉

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