I'm currently developing a pretty simple zimlet which needs to hit a web service to get a value. The web service uses SSL, however it's with a self-signed certificate, since our app is not yet to a production state.

I have the following in a function:
Code:
    var url = "https://localhost:44302/Customer/IsCurrentCustomer";

    var email = item.participants.getArray()[0].address;

    var response = this.sendRequest(email, url, null, null);
When I run my zimlet in Zimbra Desktop, I get:
HTTP ERROR 500

Problem accessing /service/proxy. Reason:

java.security.cert.CertificateException: d2:CN9:localhost1:O0:2:OU0:6:accept4:true5:alias42 :localhost:637804BB623F3E9447F0FA45F70D81A74:fromi 1305231117000e4:host9:localhost3:icn9:localhost2:i o0:3:iou0:3:md532:C24F3F8EA3838E2C2915B382F530369E 8:mismatch5:false1:s32:637804BB623F3E9447F0FA45F70 D81A74:sha140:9F2EEE7DE8F003913A53FA00629909FC7224 C06F2:toi1620777600000ee

Caused by:

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: d2:CN9:localhost1:O0:2:OU0:6:accept4:true5:alias42 :localhost:637804BB623F3E9447F0FA45F70D81A74:fromi 1305231117000e4:host9:localhost3:icn9:localhost2:i o0:3:iou0:3:md532:C24F3F8EA3838E2C2915B382F530369E 8:mismatch5:false1:s32:637804BB623F3E9447F0FA45F70 D81A74:sha140:9F2EEE7DE8F003913A53FA00629909FC7224 C06F2:toi1620777600000ee
at com.sun.net.ssl.internal.ssl.Alerts.getSSLExceptio n(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(U nknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Un known Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Un known Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serv erCertificate(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.proc essMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoo p(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_re cord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRec ord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.perform InitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(Unknown Source)
at com.zimbra.common.net.CustomSSLSocket.startHandsha ke(CustomSSLSocket.java:90)
at com.zimbra.common.net.CustomSSLSocket.getInputStre am(CustomSSLSocket.java:341)
at org.apache.commons.httpclient.HttpConnection.open( HttpConnection.java:745)
at org.apache.commons.httpclient.MultiThreadedHttpCon nectionManager$HttpConnectionAdapter.open(MultiThr eadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.e xecuteWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.e xecuteMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMe thod(HttpClient.java:397)
at com.zimbra.common.httpclient.HttpClientUtil.execut eMethod(HttpClientUtil.java:55)
at com.zimbra.common.httpclient.HttpClientUtil.execut eMethod(HttpClientUtil.java:41)
at com.zimbra.cs.zimlet.ProxyServlet.doProxy(ProxySer vlet.java:243)
at com.zimbra.cs.zimlet.ProxyServlet.doPost(ProxyServ let.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:725)
at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:208)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:814)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:218)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:422)
at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.handler.rewrite.RewriteHandler.h andle(RewriteHandler.java:230)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:543)
at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:946)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:405)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:410)
at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:451)
Caused by: java.security.cert.CertificateException: d2:CN9:localhost1:O0:2:OU0:6:accept4:true5:alias42 :localhost:637804BB623F3E9447F0FA45F70D81A74:fromi 1305231117000e4:host9:localhost3:icn9:localhost2:i o0:3:iou0:3:md532:C24F3F8EA3838E2C2915B382F530369E 8:mismatch5:false1:s32:637804BB623F3E9447F0FA45F70 D81A74:sha140:9F2EEE7DE8F003913A53FA00629909FC7224 C06F2:toi1620777600000ee
at com.zimbra.common.net.CustomTrustManager.checkServ erTrusted(CustomTrustManager.java:90)
... 41 more

I pretty much just want to get my Zimbra server to trust the self-signed certificate, but haven't figured out how. I exported the webservice's certificate, and ran this, to no avail:
Code:
keytool -importcert -keystore /opt/zimbra/java/jre/lib/security/cacerts -file <mycert.cer> -trustcacerts -storepass changeit -alias <alias>
Is there something else I'm missing?