You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Karr, David" <Da...@wamu.net> on 2003/05/02 23:23:33 UTC

Get "SSL implementation not available" with JDK 1.2.2, but not with 1.4.1

(Will there eventually be a "commons-httpclient-user" list?)

I'm trying to use HttpClient to implement a connection to a remote site
through an authenticated proxy.  I find that if I run with JDK 1.4.1, I
believe I'm getting through my proxy to the other site.  However, if I
run with JDK 1.2.2, I get the following (with javax.net.debug set to
"ssl"):

--------------------
keyStore is : 
keyStore type is : jks
init keystore
init keymanager of type SunX509
default context init failed: java.security.PrivilegedActionException
java.net.SocketException: SSL implementation not available
	at
javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
	at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSo
cket(SSLProtocolSocketFactory.java:127)
<stack entries deleted>
--------------------

I have "jsse.jar" in "$JAVA_HOME/jre/lib/ext", which I thought is what's
required to fix things like this.  It doesn't appear to make any
difference, however.

I'm using the nightly build from 20030502.


Re: Get "SSL implementation not available" with JDK 1.2.2, but not with 1.4.1

Posted by Oleg Kalnichevski <o....@dplanet.ch>.
David,

You must be missing the following lines in your
$JAVA_HOME/jre/lib/security/java.security

#
# List of providers and their preference orders (see above):
#
security.provider.1=sun.security.provider.Sun
security.provider.2=com.sun.crypto.provider.SunJCE
security.provider.3=com.sun.net.ssl.internal.ssl.Provider

It's not enough just to copy jsse.jar into $JAVA_HOME/jre/lib/ext

Please note that these settings are applicable to Sun's implementation
of JSSE only

I hope this helps

Oleg

On Fri, 2003-05-02 at 23:23, Karr, David wrote:
> (Will there eventually be a "commons-httpclient-user" list?)
> 
> I'm trying to use HttpClient to implement a connection to a remote site
> through an authenticated proxy.  I find that if I run with JDK 1.4.1, I
> believe I'm getting through my proxy to the other site.  However, if I
> run with JDK 1.2.2, I get the following (with javax.net.debug set to
> "ssl"):
> 
> --------------------
> keyStore is : 
> keyStore type is : jks
> init keystore
> init keymanager of type SunX509
> default context init failed: java.security.PrivilegedActionException
> java.net.SocketException: SSL implementation not available
> 	at
> javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
> 	at
> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSo
> cket(SSLProtocolSocketFactory.java:127)
> <stack entries deleted>
> --------------------
> 
> I have "jsse.jar" in "$JAVA_HOME/jre/lib/ext", which I thought is what's
> required to fix things like this.  It doesn't appear to make any
> difference, however.
> 
> I'm using the nightly build from 20030502.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
> 


Re: Get "SSL implementation not available" with JDK 1.2.2, but not with 1.4.1

Posted by Michael Becke <be...@u.washington.edu>.
It is also possible to dynamically register JSSE using:

	Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

If you also want to use https with java.net.URL you will also need to  
set the following system property:

	java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol

Mike

On Friday, May 2, 2003, at 05:23 PM, Karr, David wrote:

> (Will there eventually be a "commons-httpclient-user" list?)
>
> I'm trying to use HttpClient to implement a connection to a remote site
> through an authenticated proxy.  I find that if I run with JDK 1.4.1, I
> believe I'm getting through my proxy to the other site.  However, if I
> run with JDK 1.2.2, I get the following (with javax.net.debug set to
> "ssl"):
>
> --------------------
> keyStore is :
> keyStore type is : jks
> init keystore
> init keymanager of type SunX509
> default context init failed: java.security.PrivilegedActionException
> java.net.SocketException: SSL implementation not available
> 	at
> javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
> 	at
> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createS 
> o
> cket(SSLProtocolSocketFactory.java:127)
> <stack entries deleted>
> --------------------
>
> I have "jsse.jar" in "$JAVA_HOME/jre/lib/ext", which I thought is  
> what's
> required to fix things like this.  It doesn't appear to make any
> difference, however.
>
> I'm using the nightly build from 20030502.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:  
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:  
> commons-httpclient-dev-help@jakarta.apache.org
>