title: SSL Cerficate - No subject alternative names present
body: <p>I am try to generate self sign SSL certificate but get following error in cas sso:</p>
  
  <pre><code>java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
  </code></pre>
  
  <p>I am using open jdk 7 and used following commands:</p>
  
  <p><code>keytool -genkey -alias axyz -keypass changeit -keyalg RSA -ext san=ip:192.168.1.4</code></p>
  
  <p><code>keytool -export -alias axyz -keypass changeit  -file axyz.crt</code></p>
  
  <p><code>keytool -import -file axyz.crt -alias axyz -keystore /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts</code></p>
  
  <p>HostName: vaapdev
  internal ip address: 192.168.1.4
  Public IP address: 108.51.62.36</p>
  
  <p>Not sure where I am going wrong, I tried both 192.168.1.4 and 108.51.62.36 in -ext
  Tried without -ext parameter.</p>