Csr generation java

_!!! note “Configure Certificate” Please enter the hostname for which you want to request a certificate:

Select algorithm and key strength for private key:
<input data-input-for="JAVACERTTOOL_KEY_TYPE">

First, you need to generate a key pair (private and public key). This is done with the following command:

keytool -genkey \
 -alias 'FQHN' \
 -dname 'CN=FQHN' \
 -keyalg EC -groupname secp384r1 \
 -keystore 'FQHN.keystore'

Using this keypair, you can now create the CSR:

keytool -certreq \
 -alias 'FQHN' \
 -file 'FQHN.req' \
 -keystore 'FQHN.keystore'