1. Create a self signed certificate, explicitly specify connection source dns (localhost) name and ip (0.0.0.0).
This allows client to use https://localhost or https://0.0.0.0
keytool -genkey -alias profiler -keyalg RSA -keysize 1024 -validity 1365 -keypass password -keystore wiremock.jks -storepass password -ext SAN=dns:localhost,ip:0.0.0.0
- Notice -ext option that adds Subject Alternate Names and the difference with CN https://support.dnsimple.com/articles/what-is-common-name/
As a result there is a private/public key pair in wiremock.jks keystore