Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Java and SSL

Posted on 2007-04-02
5
Medium Priority
?
816 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

661 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