|
In my experience you have to add the proper root and intermediate
certificate authority certificates to the Websphere trust store. Use the
websphere administrator:
Security > SSL certificate and key management > key stores and
certificates
NodeDefaultTrustStore
And add the CA certificates there (in my case I needed to add Verisign's
because the remote system I was communicating with was using a Verisign
SSL
certificate).
Marshall
====
From: "Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
To: <java400-l@xxxxxxxxxxxx>
Date: 05/09/2011 01:01 PM
Subject: com.ibm.jsse2.util.h: No trusted certificate found error
Sent by: java400-l-bounces@xxxxxxxxxxxx
I've a small web-app that is deployed and run in the websphere 6.1 app
server. This app has this simple piece of code:
HttpURLConnection conn = null;
try {
HttpURLConnection.setFollowRedirects(false);
conn = (HttpURLConnection) new
URL(redirect.getRedirectToURL()).openConnection();
conn.setRequestMethod("HEAD");
if (conn.getResponseCode() >= 400) {
throw new RedirectException("The Redirect-To URL (" +
redirect.getRedirectToURL() + ") is invalid.");
}
}
catch (RedirectException ex){
throw ex;
}
catch (Exception ex){
throw new RedirectException("The Redirect-To URL (" +
redirect.getRedirectToURL() + ") is invalid.");
}
finally {
if (conn != null) conn.disconnect();
}
On the fourth line where it performs the connection, it works fine if
the url is a http. But it failed if the url is a https. The error that
I'm getting is "com.ibm.jsse2.util.h: No trusted certificate found". If
I run above code as a stand alone java program, it works fine for http
and https. Does anyone know why or how I can avoid this error?
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.