I think this is my problem too (see my email earlier in the day). I'm on Java 1.6_21, 64bit Windows 7, running in Jboss 4.2 if it's any help.
I won't get chance to look at this until Monday now but if there is an emergency release I'll try it out on Monday. Cheers ________________________________________ From: Oliver Siegmar [[email protected]] Sent: 14 September 2010 18:09 To: [email protected] Subject: Can't get SSL / https to work Hello, I'd like to access content that is provided by https but my code always fails with an SSLException. I tried it with a very simple example: import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; public class HttpsTest { public static void main(final String[] args) throws Exception { final HttpClient client = new DefaultHttpClient(); final HttpGet req = new HttpGet("https://www.apache.org"); client.execute(req); } } This code fails with: Exception in thread "main" javax.net.ssl.SSLException: hostname in certificate didn't match: <140.211.11.131> != <*.apache.org> at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:220) at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54) at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:149) at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:130) at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:399) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) at HttpsTest.fails(HttpsTest.java:25) at HttpsTest.main(HttpsTest.java:12) It doesn't has anything to do with wildcard certificates. Whenever I get this exception I have a combination of <ip-address> != <common-name-of-certificate> as exception message. What am I doing wrong? Unfortunately I couldn't find a simple SSL example in the docs, only stuff for customizing SSL configuration. Bye Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender (as shown above). Kindly do not reproduce, print or forward any material received in error, please delete it immediately. Pharos Communications Limited (Company No. 3458137) is incorporated in England and Wales and has its registered office at 83 London Street, Reading, Berkshire, UK, RG1 4QA. Pharos Communications Pte Limited (Company No. 200817005N) is incorporated in Singapore and has its registered office at One Marina Boulevard, #28-00. Singapore 018989 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
