java - Getting jav ax.net.ssl.SSLHandshakeException when doing docusignapi handshade -
getting javax.net.ssl.sslhandshakeexception when doing docusignapi handshade
trying use docusignapi login samples cert error.
the following code sample docusign. sets signer , docusign configuration object. when doing setdefaultapiclient call error generated.
exception in thread "main" com.sun.jersey.api.client.clienthandlerexception: jav ax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pki x path building failed: sun.security.provider.certpath.suncertpathbuilderexcepti on: unable find valid certification path requested target @ com.sun.jersey.client.urlconnection.urlconnectionclienthandler.handle (urlconnectionclienthandler.java:155) @ com.sun.jersey.api.client.client.handle(client.java:652) @ com.sun.jersey.api.client.webresource.handle(webresource.java:682) @ com.sun.jersey.api.client.webresource.access$200(webresource.java:74) @ com.sun.jersey.api.client.webresource$builder.get(webresource.java:509) @ com.docusign.esign.client.apiclient.getapiresponse(apiclient.java:563) @ com.docusign.esign.client.apiclient.invokeapi(apiclient.java:595) @ com.docusign.esign.api.authenticationapi.login(authenticationapi.java:156)
** added **
// initialize api client apiclient apiclient = new apiclient(); apiclient.setbasepath(baseurl); // create json formatted auth header string creds = "{\"username\":\"" + username + "\",\"password\":\"" + password + "\",\"integratorkey\":\"" + integratorkey + "\"}"; apiclient.adddefaultheader("x-docusign-authentication", creds); system.out.println("assign api client configuration object "); configuration.setdefaultapiclient(apiclient); }
"unable find valid certification path" means need set java stack "standard" set of trusted root certs.
what's happening: you're trying make ssl connection docusign. part of ssl process, machine has determine if trusts far end (docusign in case) or not.
to so: ssl stack tries build trust path trust store of root ca certs cert offered docusign. can't since haven't set trust store properly.
the usual "standard" set of trusted root certs ones mozilla firefox browser uses.
see https://curl.haxx.se/docs/caextract.html
how load them java stack trusted certs stack-dependent.
this question looks relevant i'm not java guy. ask question if can't figure out.
Comments
Post a Comment