How to add subject alernative name to ssl certs?

前端 未结 3 355
情歌与酒
情歌与酒 2020-11-29 00:16

I\'m using openssl to create self-signed certs. I\'m getting this error with the certs I generated:

javax.net.ssl.SSLHandshakeException: ja

3条回答
  •  失恋的感觉
    2020-11-29 01:08

    Both IP and DNS can be specified with the keytool additional argument -ext SAN=dns:abc.com,ip:1.1.1.1

    Example:

    keytool -genkeypair -keystore  -dname "CN=test, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -keypass  -storepass  -keyalg RSA -alias unknown -ext SAN=dns:test.abc.com,ip:1.1.1.1
    

提交回复
热议问题