{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/4796","labels_url":"https://api.github.com/repos/playframework/playframework/issues/4796/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/4796/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/4796/events","html_url":"https://github.com/playframework/playframework/issues/4796","id":92191594,"number":4796,"title":"WS play.ws.ssl.loose.disableHostnameVerification=true doesn't work?","user":{"login":"jxtps","id":90846,"avatar_url":"https://avatars.githubusercontent.com/u/90846?v=3","gravatar_id":"","url":"https://api.github.com/users/jxtps","html_url":"https://github.com/jxtps","followers_url":"https://api.github.com/users/jxtps/followers","following_url":"https://api.github.com/users/jxtps/following{/other_user}","gists_url":"https://api.github.com/users/jxtps/gists{/gist_id}","starred_url":"https://api.github.com/users/jxtps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxtps/subscriptions","organizations_url":"https://api.github.com/users/jxtps/orgs","repos_url":"https://api.github.com/users/jxtps/repos","events_url":"https://api.github.com/users/jxtps/events{/privacy}","received_events_url":"https://api.github.com/users/jxtps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-30T20:27:50Z","updated_at":"2015-07-02T22:43:48Z","closed_at":null,"body":"\r\nI have set `play.ws.ssl.loose.disableHostnameVerification=true` and then call a web service on localhost that is known to return a certificate for not-localhost (See [this async-http-client issue](https://github.com/AsyncHttpClient/async-http-client/issues/927) for the details), but the call still fails as per the log extract below. \r\n\r\nWindows 8, Play 2.4.1, Scala 2.11.7, Java 8.0_45. \r\n\r\n```\r\nC:\\work\\play_web>activator run\r\n[info] Loading project definition from C:\\work\\play_web\\project\r\n[info] Set current project to play_web (in build file:/C:/work/play_web/)\r\nWarning: node.js detection failed, sbt will use the Rhino based Trireme JavaScript engine instead to run JavaScript assets compilation, which in some\r\ncases may be orders of magnitude slower than using node.js.\r\n\r\n--- (Running the application, auto-reloading is enabled) ---\r\n\r\n[info] p.a.l.c.ActorSystemProvider - Starting application default Akka system: application\r\n[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000\r\n\r\n(Server started, use Ctrl+D to stop and go back to the console...)\r\n\r\n[info] Compiling 1 Scala source to C:\\work\\play_web\\target\\scala-2.11\\classes...\r\nWARN application - Logger configuration in conf files is deprecated and has no effect. Use a logback configuration file instead.\r\nINFO application - Creating Pool for datasource 'default'\r\nINFO p.a.d.DefaultDBApi - Database [default] connected at jdbc:mysql://localhost/play_dev?useUnicode=yes&characterEncoding=UTF-8&connectionCollation=utf8_general_ci\r\nINFO p.a.l.c.ActorSystemProvider - Starting application default Akka system: application\r\nINFO play.api.Play - Application started (Dev)\r\nWARN p.a.l.w.n.NingAsyncHttpClientConfigBuilder - buildHostnameVerifier: disabling hostname verification\r\nERROR application - elb failed to fetch example.com https://localhost/monit\r\njava.net.ConnectException: General SSLEngine problem\r\n        at com.ning.http.client.providers.netty.request.NettyConnectListener.onFutureFailure(NettyConnectListener.java:128) ~[async-http-client-1.9.21.jar:na]\r\n        at com.ning.http.client.providers.netty.request.NettyConnectListener.access$200(NettyConnectListener.java:37) ~[async-http-client-1.9.21.jar:na]\r\n        at com.ning.http.client.providers.netty.request.NettyConnectListener$1.operationComplete(NettyConnectListener.java:101) ~[async-http-client-1.9.21.jar:na]\r\n        at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:409) ~[netty-3.10.3.Final.jar:na]\r\n        at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:395) ~[netty-3.10.3.Final.jar:na]\r\nCaused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem\r\n        at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1431) ~[na:1.8.0_45]\r\n        at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535) ~[na:1.8.0_45]\r\n        at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813) ~[na:1.8.0_45]\r\n        at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781) ~[na:1.8.0_45]\r\n        at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) ~[na:1.8.0_45]\r\nCaused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem\r\n        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[na:1.8.0_45]\r\n        at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1728) ~[na:1.8.0_45]\r\n        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:304) ~[na:1.8.0_45]\r\n        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[na:1.8.0_45]\r\n        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1478) ~[na:1.8.0_45]\r\nCaused by: java.security.cert.CertificateException: No subject alternative DNS name matching localhost found.\r\n        at sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:204) ~[na:1.8.0_45]\r\n        at sun.security.util.HostnameChecker.match(HostnameChecker.java:95) ~[na:1.8.0_45]\r\n        at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455) ~[na:1.8.0_45]\r\n        at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:436) ~[na:1.8.0_45]\r\n        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:252) ~[na:1.8.0_45]\t\t\r\n```"},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/118186739","html_url":"https://github.com/playframework/playframework/issues/4796#issuecomment-118186739","issue_url":"https://api.github.com/repos/playframework/playframework/issues/4796","id":118186739,"user":{"login":"jxtps","id":90846,"avatar_url":"https://avatars.githubusercontent.com/u/90846?v=3","gravatar_id":"","url":"https://api.github.com/users/jxtps","html_url":"https://github.com/jxtps","followers_url":"https://api.github.com/users/jxtps/followers","following_url":"https://api.github.com/users/jxtps/following{/other_user}","gists_url":"https://api.github.com/users/jxtps/gists{/gist_id}","starred_url":"https://api.github.com/users/jxtps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxtps/subscriptions","organizations_url":"https://api.github.com/users/jxtps/orgs","repos_url":"https://api.github.com/users/jxtps/repos","events_url":"https://api.github.com/users/jxtps/events{/privacy}","received_events_url":"https://api.github.com/users/jxtps/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T22:43:48Z","updated_at":"2015-07-02T22:43:48Z","body":"Turns out the AsyncHttpClientConfig.Builder.setHostnameVerifier() method has been removed from async-http-client in master, presumably because it didn't actually work. \r\n\r\nI guess that means this particular configuration option will eventually be removed from Play? "}}