commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brant.h...@insightbb.com
Subject [HttpClient] SSL problems with Java 1.5
Date Thu, 18 Nov 2004 19:13:13 GMT
Hi,

Before I get quized on how HttpClient 2.0.2 isn't fully supported by verson 1.5 
of Java, I'll let it out that I realize this, but wondered if I could get 
around my problem without having to downgrade my JVM.  I just noticed today 
that one of HttpClient applications is getting an SSL error:

javax.net.ssl.SSLKeyException: RSA premaster secret error
	at com.sun.net.ssl.internal.ssl.PreMasterSecret.<init>(Unknown Source)
	at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone
(Unknown Source)
	at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown 
Source)
Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider 
supporting RSA/ECB/PKCS1Padding
	at javax.crypto.Cipher.getInstance(DashoA12275)
	at com.sun.net.ssl.internal.ssl.JsseJce.getCipher(Unknown Source)
	at com.sun.net.ssl.internal.ssl.RSACipher.<init>(Unknown Source)
	at com.sun.net.ssl.internal.ssl.RSACipher.getInstance(Unknown Source)

When registering the StrictSSLProtocolSocketFactory class as a part of the 
https Protocol, I get the following:

javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
	at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificateChain
(Unknown Source)
	at 
org.apache.commons.httpclient.contrib.ssl.StrictSSLProtocolSocketFactory.verifyH
ostname(StrictSSLProtocolSocketFactory.java:216)
	at 
org.apache.commons.httpclient.contrib.ssl.StrictSSLProtocolSocketFactory.createS
ocket(StrictSSLProtocolSocketFactory.java:185)
	at org.apache.commons.httpclient.HttpConnection.tunnelCreated
(HttpConnection.java:746)
	at org.apache.commons.httpclient.ConnectMethod.execute
(ConnectMethod.java:172)
	at org.apache.commons.httpclient.HttpClient.executeMethod
(HttpClient.java:643)
	at org.apache.commons.httpclient.HttpClient.executeMethod
(HttpClient.java:497)

I was hoping that would fix the problem, but obviously didn't.  Of course, 
running under Java v1.4_6, this works fine.  I can easily switch to it, but I 
was wondering if I could get an idea on how to fix this before I go about doing 
so.  I'm a novice when it comes to SSL, hence me looking for help through you 
guys.  Thanks!

-Brant

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message