Solved

Java and SSL

Posted on 2007-04-02
5
742 Views
Last Modified: 2013-12-29
Hi,
I received a JAR file from Barclays bank (Java SDK for ARCOT Transfort Merchant Services). Anyway I managed to install the jar file, Netbeans can use the librar etc. etc.
The problem is about SSL.
The jar file comes with 3 PEM files and system uses SSL to connect to barclays. So I assume in one way or other there 3 cert files need to be installed as well.Can someone help me on this?
This is the output when I run the software

init:
deps-jar:
compile:
run:
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Untrusted Server Certificate Chain
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1520)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:182)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:176)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:975)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:511)
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:449)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:817)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1029)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1056)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1040)
        at com.arcot.comm.SSLTransport.connect(com/arcot/comm/SSLTransport.java:225)
        at com.arcot.xfms.XFMSClient.receiveResponse(com/arcot/xfms/XFMSClient.java:1330)
        at com.arcot.xfms.XFMSClient.checkIfAuthPossible(com/arcot/xfms/XFMSClient.java:122)
        at javaapplication13.Main.main(Main.java:45)
Caused by: java.security.cert.CertificateException: Untrusted Server Certificate Chain
        at com.sun.net.ssl.X509TrustManagerJavaxWrapper.checkServerTrusted(SSLSecurity.java:600)
XFMSFactory.checkIfAuthPossible failed.
Error num: 9006
Error msg: Unable to connect to MS: Connect failed to www.vbv2bmshost.co.uk:9707 'com.arcot.comm.TransportException: Unable to connect to the server or IO error occurs.'
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:967)
        ... 11 more
BUILD SUCCESSFUL (total time: 5 seconds)
0
Comment
Question by:bilgehanyildirim
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
Comment Utility
Use keytool to import certs. SImilar here

http://www.geotrusteurope.com/support/install/install_jse.htm
0
 

Author Comment

by:bilgehanyildirim
Comment Utility
Hi Cehj,
I forgot to mention that I am a beginnner :)
The url you sent is showing (I think) how to configure the web server. I am trying to run this app on the local comp with netbeans. no web server is being used at the moment.
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:-)
0
 

Expert Comment

by:Daza_WIlliams
Comment Utility
The URL in the accepted shortcut no longer works
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Receive file in Servlet 1 36
Modeling a class in java 5 31
Free Alternative to JIRA 4 49
github account with ecipse 1 15
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now