java - Execute Third-Party Jar From Command Line, Flag To Ignore SSL Issues? -


i'm executing w3c css validator jar command line, built latest-available source. exceptions raised when jar requests https urls.

some https urls fine, others not. of cause exceptions raised of aware (just one), ssl cert appears fine when requesting relevant url in chrome.

i call css validator follows:

java -jar css-validator.jar "https://example.com/" 

and following error output:

javax.net.ssl.sslexception: server key     @ sun.security.ssl.handshaker.throwsslexception(handshaker.java:1274)     @ sun.security.ssl.clienthandshaker.processmessage(clienthandshaker.java:223)     @ sun.security.ssl.handshaker.processloop(handshaker.java:868)     @ sun.security.ssl.handshaker.process_record(handshaker.java:804)     @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:1032)     @ sun.security.ssl.sslsocketimpl.performinitialhandshake(sslsocketimpl.java:1328)     @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1355)     @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1339)     @ sun.net.www.protocol.https.httpsclient.afterconnect(httpsclient.java:515)     @ sun.net.www.protocol.https.abstractdelegatehttpsurlconnection.connect(abstractdelegatehttpsurlconnection.java:185)     @ sun.net.www.protocol.https.httpsurlconnectionimpl.connect(httpsurlconnectionimpl.java:153)     @ org.w3c.css.util.httpurl.getconnection(httpurl.java:257)     @ org.w3c.css.util.httpurl.getconnection(httpurl.java:312)     @ org.w3c.css.css.documentparser.<init>(documentparser.java:124)     @ org.w3c.css.css.cssvalidator.main(cssvalidator.java:154) caused by: java.security.spec.invalidkeyspecexception: not create ec public key     @ sun.security.pkcs11.p11eckeyfactory.enginegeneratepublic(p11eckeyfactory.java:169)     @ java.security.keyfactory.generatepublic(keyfactory.java:334)     @ sun.security.ssl.handshakemessage$ecdh_serverkeyexchange.<init>(handshakemessage.java:1057)     @ sun.security.ssl.clienthandshaker.processmessage(clienthandshaker.java:218)     ... 13 more caused by: sun.security.pkcs11.wrapper.pkcs11exception: ckr_domain_params_invalid     @ sun.security.pkcs11.wrapper.pkcs11.c_createobject(native method)     @ sun.security.pkcs11.p11eckeyfactory.generatepublic(p11eckeyfactory.java:233)     @ sun.security.pkcs11.p11eckeyfactory.enginegeneratepublic(p11eckeyfactory.java:164)     ... 16 more 

i'd ideally ignore absolutely such ssl errors raised when executing jar command line using along lines of:

java -ignore-all-of-these-ssl-errors-please -jar css-validator.jar "https://example.com/" 

clearly ignore-all-of-these-ssl-errors-please not valid command line flag.

is there flag this?

not possible. it's way reason, , reason prevent writing code else implicitly trusts ensure ssl session secure , genuine. reason works in chrome , not java java comes sparse set of root cas.

the way around if don't control code add necessary ca certificates local keystore. believe can export chrome's cas in form can import keystore.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -