Hi,
Since I've upgraded my server to Java 1.8 (Oracle JRE), application links from Stash to other Atlassian applications are not working anymore. I always get the following exception when trying to add an application link although I've secured Stash with SSL through Apache and not Tomcat, so I'm wondering why an error like this comes up at all:
Caused by: javax.net.ssl.SSLException: java.security.cert.CertificateException: No subject alternative names present
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:287) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:267) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:176) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at com.atlassian.sal.core.net.CustomSSLProtocolSocketFactory.createSocket(CustomSSLProtocolSocketFactory.java:101) ~[sal-core-2.13.4.jar:na]
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) ~[commons-httpclient-3.1-atlassian-2.jar:na]
at com.atlassian.sal.core.net.HttpClientRequest.executeMethod(HttpClientRequest.java:597) ~[sal-core-2.13.4.jar:na]
at com.atlassian.sal.core.net.HttpClientRequest.executeMethod(HttpClientRequest.java:556) ~[sal-core-2.13.4.jar:na]
at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:360) ~[sal-core-2.13.4.jar:na]
at com.atlassian.applinks.core.manifest.AppLinksManifestDownloader.download1(AppLinksManifestDownloader.java:150) ~[applinks-plugin-4.3.7_1431489370000.jar:na]
... 30 common frames omitted
Caused by: java.security.cert.CertificateException: No subject alternative names present
at sun.security.util.HostnameChecker.matchIP(HostnameChecker.java:142) ~[na:1.7.0_79]
at sun.security.util.HostnameChecker.match(HostnameChecker.java:91) ~[na:1.7.0_79]
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:284) ~[commons-httpclient-3.1-atlassian-2.jar:na]
I'm aware that there is an option to use keytool to specify an alternate server name (the IP in my case) which I'm using with a self-signed certificate, but I do not see why this was not the case with Java 1.7. And do I need the certificate in the key store of the JRE when I've secured Stash with Apache as described in https://confluence.atlassian.com/display/STASH/Securing+Stash+with+Apache+using+SSL ?
Any ideas?
Thanks,
Michael