I am trying to configure SSL and get the .pfx file from the server command. Certificate Chain Length: 2
When I try to export a certificate chain using keytool, only the first certificate is exported.
Trying to find out if there are any other parameters that I skip when issuing the keytool command.
The commands I use are:
1) conversion to JKS, since the alias is not supported using pfx
keytool -importkeystore -srckeystore "serverauth.pfx" -srcstoretype pkcs12 -destkeystore "serverauth.jks"
2) Tried to export certificates using below.
keytool -export -alias 1 -keystore "serverauth.jks" -rfc -file "authclient.cert"
But the above command generates only the first certificate.
If I delete the entire alias, getting an error
keytool error: java.lang.Exception: Alias <1> does not exist
Is there any other process.
source
share