B4J Question jServer: how to create a HTTPs certficate

wl

Well-Known Member
Licensed User
Longtime User
Hi,

As I want to use a Let's encrypt certficate for HTTPS:

I used the openssl implementation for Windows and the ACME jar file as described in https://www.b4x.com/android/forum/t...rypt-certificates-acme-client.101385/#content

And the example on the reference page to create a wildcard certificate.

I ended up with three files: cert.pem, chain.pem and fullchain.pem

I now need to convert them to a Java JKS, which (if I found this correctly) needs to pass by creating a pkcs12 file, by a command like
"openssl pkcs12 -export -out cert.pkcs12 -in cert.pem -inkey key.pem"

but what is my key.pem in the statement above ?

Thanks
 

OliverA

Expert
Licensed User
Longtime User
The private key you created to request/sign the certificate
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Indeed thanks. It was the .CSR file I created in the process ...
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Based on the info and the ACME jar I wrote a B4J application that generates the Let's encrypt certificates and does the challenging automatically on Cloudflare through their API (DNS challenging because I needed wildcard certificates and this does not seem supported through HTTP challenging on Let's encrypt).

Finally it converts the Let's encrypt certificates into a .JKS file (that the Jetty HTTP server needs).

It can also fully automatically renew the certificates.

Just let me know if this is something that could be useful for others as well...
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Just let me know if this is something that could be useful for others as well..
Tutorials are always welcome! Especially about this subject matter
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…