Servlet making an SSL connection

I have a server that uses a servlet to send a message via HTTPS to an authorize.net gateway. The server SSL works find, however the client side is being rejected with a "javax.net.ssl.SSLException: untrusted server cert chain" message.

What do I need to configure for the client servlet to work with SSL? Do I need to create another keystore? What certificates to I need to import? Does it matter what aliases I use?

Thanks
Ross
LVL 3
w0lverAsked:
Who is Participating?
 
justywongCommented:
it can be caused by the CA of the server cert not exist in your trusted cacerts store.
you can import the CA cert into your cacerts file. for more details, you can reference to the following link:

http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsalert/57436

in part 4 (workaround), you should be able to find the solution.
0
 
cheekycjCommented:
Just ran into this a month ago with a vendor of ours using instant ssl certs.

what SSL cert do you have installed on your server?

Untrusted Cert chain is usually due to the cert you have not being one of the accepted ones in the jdk's keystore.

You have to import the certs on your server to the client's keystore.

Instructions can be found at:
http://www.instantssl.com/ssl-certificate-support/cert_installation/ssl-certificate-java.html?currency=USD®ion=North%20America&country=US
or
http://www.jodohost.com/reseller/html/merchant_thepaydesk.html

CJ
0
 
rama_krishna580Commented:
Hi,

look at here, it may help you...

I think you need to import the certificate from that site into the Java
key store. To do this, you use the keytool utility from the JDK:

keytool -import
        -keystore <path_to_JDK_installation>/jre/lib/security/cacerts
        -alias <some_nickname_you_choose_for_the_site>
        -file <path_to_certificate_file>
(this is all on one command line)

It will prompt you for the key store password. If the password was not
changed since the JDK installation, it defaults to "changeit" (at least
in JDK 1.3).

best of luck...

R.K
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.