Security, API, Coding, Software Development, Programming.
We can use the corresponding public certificate instead of -k if we have a self-signed certificate. By using the following keytool command, we can export the public certificate as a PEM file, tlsdemo.crt. $ keytool -export -file tlsdemo.crt -alias tlsdemo -rfc -keystore keystore.p12 -storepass