java - bypass JVM security check when SSL certificate is invalid -
i wrote web service client , plugin it. plugin combine services of web service client. on server side, don't have valid ssl certificate , therefore have problem testing it. tried bypass java security checking this way . work in web service client's test doesn't work in plugin's test. in plugin's test, got exception :
caused by: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ sun.security.ssl.alerts.getsslexception(alerts.java:192) @ sun.security.ssl.sslsocketimpl.fatal(sslsocketimpl.java:1884) @ sun.security.ssl.handshaker.fatalse(handshaker.java:276) @ sun.security.ssl.handshaker.fatalse(handshaker.java:270) @ sun.security.ssl.clienthandshaker.servercertificate(clienthandshaker.java:1341) @ sun.security.ssl.clienthandshaker.processmessage(clienthandshaker.java:153) @ sun.security.ssl.handshaker.processloop(handshaker.java:868) @ sun.security.ssl.handshaker.process_record(handshaker.java:804) @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:1016) @ sun.security.ssl.sslsocketimpl.performinitialhandshake(sslsocketimpl.java:1312) @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1339) @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1323) @ sun.net.www.protocol.https.httpsclient.afterconnect(httpsclient.java:563) @ sun.net.www.protocol.https.abstractdelegatehttpsurlconnection.connect(abstractdelegatehttpsurlconnection.java:185) @ sun.net.www.protocol.http.httpurlconnection.getinputstream(httpurlconnection.java:1300) @ sun.net.www.protocol.https.httpsurlconnectionimpl.getinputstream(httpsurlconnectionimpl.java:254) @ java.net.url.openstream(url.java:1037) @ com.sun.xml.ws.wsdl.parser.runtimewsdlparser.createreader(runtimewsdlparser.java:994) @ com.sun.xml.ws.wsdl.parser.runtimewsdlparser.resolvewsdl(runtimewsdlparser.java:395) @ com.sun.xml.ws.wsdl.parser.runtimewsdlparser.parse(runtimewsdlparser.java:214) ... 75 more caused by: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ sun.security.validator.pkixvalidator.dobuild(pkixvalidator.java:385) @ sun.security.validator.pkixvalidator.enginevalidate(pkixvalidator.java:292) @ sun.security.validator.validator.validate(validator.java:260) @ sun.security.ssl.x509trustmanagerimpl.validate(x509trustmanagerimpl.java:326) @ sun.security.ssl.x509trustmanagerimpl.checktrusted(x509trustmanagerimpl.java:231) @ sun.security.ssl.x509trustmanagerimpl.checkservertrusted(x509trustmanagerimpl.java:126) @ sun.security.ssl.clienthandshaker.servercertificate(clienthandshaker.java:1323) ... 90 more caused by: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ sun.security.provider.certpath.suncertpathbuilder.enginebuild(suncertpathbuilder.java:196) @ java.security.cert.certpathbuilder.build(certpathbuilder.java:268) @ sun.security.validator.pkixvalidator.dobuild(pkixvalidator.java:380)
in intelij, sun classes source code doesn't available, debug process difficult. can't me. way, after read similar questions , answers, several hours trial , errors, search on web, debug , ... , question : know way bypass jvm security checking works in situation ?
Comments
Post a Comment