Solved

Java and SSL

Posted on 2007-04-02
5
789 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
ID: 18836268
Use keytool to import certs. SImilar here

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

Author Comment

by:bilgehanyildirim
ID: 18836875
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:Mayank S
ID: 18839184
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18851916
:-)
0
 

Expert Comment

by:Daza_WIlliams
ID: 26417680
The URL in the accepted shortcut no longer works
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to Alipay 10 67
Is there a simpler dropbox system? 10 44
Coding for the first time 9 62
Java Inheritance super keyword use 8 29
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

679 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