Problem using HTTPClient with SSL in Websphere

View: New views
2 Messages — Rating Filter:   Alert me  

Problem using HTTPClient with SSL in Websphere

by MarcEck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I already posted this problem in an ibm forum, but they haven't an answer yet....

I have an implementation with HttpClient to make a https connection.

When I use this with the JVM (in a junit test) from RSA (Rational Software Architect), all works fine. If I call the same within websphere I get this exception:

javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found
        at com.ibm.jsse2.n.a(n.java:15)
        at com.ibm.jsse2.jc.a(jc.java:171)
        at com.ibm.jsse2.db.a(db.java:129)
        at com.ibm.jsse2.db.a(db.java:333)
        at com.ibm.jsse2.eb.a(eb.java:145)
        at com.ibm.jsse2.eb.a(eb.java:274)
        at com.ibm.jsse2.db.m(db.java:330)
        at com.ibm.jsse2.db.a(db.java:149)
        at com.ibm.jsse2.jc.a(jc.java:450)
        at com.ibm.jsse2.jc.g(jc.java:115)
        at com.ibm.jsse2.jc.a(jc.java:187)
        at com.ibm.jsse2.j.write(j.java:8)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:88)
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:127)
        at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
        at org.apache.commons.httpclient.methods.ByteArrayRequestEntity.writeRequest(ByteArrayRequestEntity.java:90)

So I assume that the RSA JVM somehow can find the certificate, the websphere not. But I checked the cacert files, they are both identical.

Is there a way to tell HTTPClient which keystore it should use. So I can create an own keystore, which I provide to HTTPClient?

Thanks in advance ...

/Marc

Re: Problem using HTTPClient with SSL in Websphere

by olegk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2008-09-03 at 08:08 -0700, MarcEck wrote:

> Hi,
>
> I already posted this problem in an ibm forum, but they haven't an answer
> yet....
>
> I have an implementation with HttpClient to make a https connection.
>
> When I use this with the JVM (in a junit test) from RSA (Rational Software
> Architect), all works fine. If I call the same within websphere I get this
> exception:
>
> javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted
> certificate found
> at com.ibm.jsse2.n.a(n.java:15)
> at com.ibm.jsse2.jc.a(jc.java:171)
> at com.ibm.jsse2.db.a(db.java:129)
> at com.ibm.jsse2.db.a(db.java:333)
> at com.ibm.jsse2.eb.a(eb.java:145)
> at com.ibm.jsse2.eb.a(eb.java:274)
> at com.ibm.jsse2.db.m(db.java:330)
> at com.ibm.jsse2.db.a(db.java:149)
> at com.ibm.jsse2.jc.a(jc.java:450)
> at com.ibm.jsse2.jc.g(jc.java:115)
> at com.ibm.jsse2.jc.a(jc.java:187)
> at com.ibm.jsse2.j.write(j.java:8)
> at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:88)
> at java.io.BufferedOutputStream.write(BufferedOutputStream.java:127)
> at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
> at
> org.apache.commons.httpclient.methods.ByteArrayRequestEntity.writeRequest(ByteArrayRequestEntity.java:90)
>
> So I assume that the RSA JVM somehow can find the certificate, the websphere
> not. But I checked the cacert files, they are both identical.
>
> Is there a way to tell HTTPClient which keystore it should use. So I can
> create an own keystore, which I provide to HTTPClient?
>
> Thanks in advance ...
>

Please have a look at the "Customizing SSL in HttpClient" and "Examples
of SSL customization in HttpClient" sections of the HttpClient SSL
guide:

http://hc.apache.org/httpclient-3.x/sslguide.html

Oleg

> /Marc
>


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...

LightInTheBox - Buy quality products at wholesale price!