src/test/resources/keystore-localhost.jks holds a certificate for "localhost", listed as a subject
alternative name, so it can be used to test host name verification. It was created using the
following commands:
openssl req -x509 \
 -newkey rsa:4096 \
 -keyout key.pem \
 -out cert.pem \
 -days 3650 \
 -sha256 \
 -nodes \
 -subj "/C=US/ST=State/L=Loc/O=Org/OU=Unit/CN=localhost/serialNumber=1234567891" \
 -set_serial 1234567891 \
 -addext "subjectAltName=DNS:localhost"
openssl pkcs12 -export \
 -out keystore.p12 \
 -inkey key.pem \
 -in cert.pem \
 -name cert \
 -passout pass:changeit
keytool -importkeystore \
 -srckeystore keystore.p12 \
 -srcstoretype PKCS12 \
 -destkeystore keystore-localhost.jks \
 -deststoretype JKS \
 -srcstorepass changeit \
 -deststorepass changeit
