Certificate not Trusted - Websphere

This is a discussion on Certificate not Trusted - Websphere ; I am trying to get an XML request sent into the WebSphere server. When I send the request I am getting a Certificate Not Trusted error. I realize this is probablly not a WebSphere issue, but I don't have anywhere ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Certificate not Trusted

  1. Certificate not Trusted

    I am trying to get an XML request sent into the WebSphere server.
    When I send the request I am getting a Certificate Not Trusted error.
    I realize this is probablly not a WebSphere issue, but I don't have
    anywhere else to turn. I have installed the local certificate on my
    browser and it likes it. Here is the code I am using?

    private String xmlMsg = "";
    System.setProperty("java.protocol.handler.pkgs",
    "com.ibm.net.ssl.internal.www.protocol");
    //
    URLConnection uc = new URL("https://localhost:7443/webapp/wcs/stores/
    servlet/").openConnection();
    uc.setDoOutput(true);
    BufferedWriter wr = new BufferedWriter(new
    OutputStreamWriter(uc.getOutputStream(), "UTF-8"));
    wr.write(xmlMsg);
    wr.flush();


    Here is the error I am seeing:
    javax.net.ssl.SSLHandshakeException:
    java.security.cert.CertificateException: Certificate not Trusted
    at com.ibm.jsse2.bx.a(Unknown Source)
    at com.ibm.jsse2.by.a(Unknown Source)
    at com.ibm.jsse2.by.a(Unknown Source)
    at com.ibm.jsse2.w.a(Unknown Source)
    at com.ibm.jsse2.w.a(Unknown Source)
    at com.ibm.jsse2.v.a(Unknown Source)
    at com.ibm.jsse2.by.a(Unknown Source)
    at com.ibm.jsse2.by.l(Unknown Source)
    at com.ibm.jsse2.by.startHandshake(Unknown Source)
    at com.ibm.net.ssl.www.protocol.https.b.o(Unknown Source)
    at com.ibm.net.ssl.www.protocol.https.q.connect(Unknown Source)
    at com.ibm.net.ssl.www.protocol.http.ch.getOutputStream(Unknown
    Source)
    at
    com.ibm.net.ssl.internal.http://www.protocol.https.HttpsURLCo...Stream(Unknown
    Source)
    at com.cds.yahoo.SendXMLPost.main(SendXMLPost.java:36 )
    Caused by: java.security.cert.CertificateException: Certificate not
    Trusted
    at com.ibm.jsse.bi.a(Unknown Source)
    at com.ibm.jsse.bi.checkServerTrusted(Unknown Source)
    at com.ibm.jsse2.ba.checkServerTrusted(Unknown Source)
    ... 11 more

    Thanks in advance for your help.
    Jamie


  2. Re: Certificate not Trusted

    On Apr 24, 3:45 pm, xspu...@gmail.com wrote:
    > I am trying to get an XML request sent into the WebSphere server.
    > When I send the request I am getting a Certificate Not Trusted error.
    > I realize this is probablly not a WebSphere issue, but I don't have
    > anywhere else to turn. I have installed the local certificate on my
    > browser and it likes it. Here is the code I am using?
    >
    > private String xmlMsg = "";
    > System.setProperty("java.protocol.handler.pkgs",
    > "com.ibm.net.ssl.internal.www.protocol");
    > //
    > URLConnection uc = new URL("https://localhost:7443/webapp/wcs/stores/
    > servlet/").openConnection();
    > uc.setDoOutput(true);
    > BufferedWriter wr = new BufferedWriter(new
    > OutputStreamWriter(uc.getOutputStream(), "UTF-8"));
    > wr.write(xmlMsg);
    > wr.flush();
    >
    > Here is the error I am seeing:
    > javax.net.ssl.SSLHandshakeException:
    > java.security.cert.CertificateException: Certificate not Trusted
    > at com.ibm.jsse2.bx.a(Unknown Source)
    > at com.ibm.jsse2.by.a(Unknown Source)
    > at com.ibm.jsse2.by.a(Unknown Source)
    > at com.ibm.jsse2.w.a(Unknown Source)
    > at com.ibm.jsse2.w.a(Unknown Source)
    > at com.ibm.jsse2.v.a(Unknown Source)
    > at com.ibm.jsse2.by.a(Unknown Source)
    > at com.ibm.jsse2.by.l(Unknown Source)
    > at com.ibm.jsse2.by.startHandshake(Unknown Source)
    > at com.ibm.net.ssl.www.protocol.https.b.o(UnknownSource)
    > at com.ibm.net.ssl.www.protocol.https.q.connect(UnknownSource)
    > at com.ibm.net.ssl.www.protocol.http.ch.getOutputStream(Unknown
    > Source)
    > at
    > com.ibm.net.ssl.internal.http://www.protocol.https.HttpsURLCo...Stream(Unknown
    > Source)
    > at com.cds.yahoo.SendXMLPost.main(SendXMLPost.java:36 )
    > Caused by: java.security.cert.CertificateException: Certificate not
    > Trusted
    > at com.ibm.jsse.bi.a(Unknown Source)
    > at com.ibm.jsse.bi.checkServerTrusted(Unknown Source)
    > at com.ibm.jsse2.ba.checkServerTrusted(Unknown Source)
    > ... 11 more
    >
    > Thanks in advance for your help.
    > Jamie


    When you say "I am trying to get an XML request sent into the
    WebSphere server"
    What exactly do you mean and from where?



+ Reply to Thread