1、使用
keytool -genkey -keystore chap8.keystore -storepass rmi+ssl -keypass rmi+ssl -keyalg RSA -alias chapter8 -validity 3650 -dname "cn=chapter8 example,ou=admin book,dc=jboss,dc=org"
2、在domain.xml或standalone.xml文件中添加:
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" enable-lookups="false" secure="true">
<ssl name="ssl" key-alias="chapter8" password="rmi+ssl" certificate-key-file="${jboss.server.config.dir}/chap8.keystore" protocol="TLSv1" verify-client="false" certificate-file="${jboss.server.config.dir}/chap8.keystore"/>
</connector>