I have a java agent in which I want to send my data over HTTPS. HTTP works. But HTTPS does not. I get this error:
javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: No trusted certificate found
at com.ibm.jsse2.o.a(o.java:9)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:340)
at com.ibm.jsse2.kb.a(kb.java:279)
at com.ibm.jsse2.kb.a(kb.java:221)
at com.ibm.jsse2.lb.a(lb.java:97)
at com.ibm.jsse2.lb.a(lb.java:102)
at com.ibm.jsse2.kb.t(kb.java:227)
at com.ibm.jsse2.kb.a(kb.java:425)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:785)
at com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:675)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:669)
at com.ibm.jsse2.SSLSocketImpl.startHandshake(SSLSocketImpl.java:95)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:162)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:36)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1044)
at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:53)
at JavaAgent.postOrder(Unknown Source)
at JavaAgent.NotesMain(Unknown Source)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(Unknown Source)
Caused by: com.ibm.jsse2.util.j: No trusted certificate found
at com.ibm.jsse2.util.i.a(i.java:76)
at com.ibm.jsse2.util.i.b(i.java:136)
at com.ibm.jsse2.util.g.a(g.java:12)
at com.ibm.jsse2.pc.a(pc.java:56)
at com.ibm.jsse2.pc.checkServerTrusted(pc.java:95)
at com.ibm.jsse2.pc.b(pc.java:84)
at com.ibm.jsse2.lb.a(lb.java:639)
The code for posting is this:
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length));
conn.setDoOutput(true);
conn.getOutputStream().write(postDataBytes);
I took the certificates from website (where I am sending my POST to) and installed these certificates on the server > ikeyman.exe (*according to http://www-01.ibm.com/support/docview.wss?uid=swg21588966). Afterwards I rebooted the whole server but still I get the handshake error. How can this be? The agent is on this server also (lets call this server B) but server B is a replicate of Server A. I am manually running the agent on server B.. Installed is IBM Domino Designer 9.0 Social Edition
Release 9.0.1FP4
SOLUTION:
Installed certificates on ikeyman. Agent needs to be run scheduled and not manually.