java - Tomcat 8 + Providing keystoreProvider in connector tag for SSL -
i want specify provider used tomcat connector default taken java.security file.
as per tomcat documentation:
the name of keystore provider used server certificate. if not specified, list of registered providers traversed in preference order , first provider supports keystoretype used.
<connector algorithm="sunx509" port="9443" keystoreprovider="" truststoreprovider="sunprovider" protocol="org.apache.coyote.http11.http11nioprotocol" sslenabled="true" maxthreads="100" minsparethreads="10" maxconnections="1000" scheme="https" secure="true" keystorefile="xxx.jks" keystorepass="xxx" keystoretype="jks" truststorefile="yyy.jks" truststorepass="yy" truststoretype="jks" clientauth="want" sslprotocol="tlsv1.2">
but not aware of teh possible values put attribute. tried this, getting error:
org.apache.tomcat.util.net.jsse.jssesocketfactory.getstore failed load keystore type jks path /app/tomcat/conf/jks/xxx.jks due no such provider: sunprovider java.security.nosuchproviderexception: no such provider: sunprovider @ sun.security.jca.getinstance.getservice(getinstance.java:83) @ sun.security.jca.getinstance.getinstance(getinstance.java:206) @ java.security.security.getimpl(security.java:698) @ java.security.keystore.getinstance(keystore.java:896) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getstore(jssesocketfactory.java:424) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getkeystore(jssesocketfactory.java:339) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getkeymanagers(jssesocketfactory.java:597) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getkeymanagers(jssesocketfactory.java:537) @ org.apache.tomcat.util.net.nioendpoint.bind(nioendpoint.java:358) @ org.apache.tomcat.util.net.abstractendpoint.init(abstractendpoint.java:737) @ org.apache.coyote.abstractprotocol.init(abstractprotocol.java:457) @ org.apache.coyote.http11.abstracthttp11jsseprotocol.init(abstracthttp11jsseprotocol.java:120)
the java,security file me as below:
# # list of providers , preference orders (see above): # security.provider.1=sun.security.provider.sun security.provider.2=sun.security.rsa.sunrsasign security.provider.4=sun.security.ec.sunec security.provider.5=com.sun.net.ssl.internal.ssl.provider security.provider.6=com.sun.crypto.provider.sunjce security.provider.7=sun.security.jgss.sunprovider security.provider.8=com.sun.security.sasl.provider security.provider.9=org.jcp.xml.dsig.internal.dom.xmldsigri security.provider.10=sun.security.smartcardio.sunpcsc security.provider.3=com.safenetinc.luna.provider.lunaprovider
edit:-
i tried using sunjsse provider, geeting jks not found error that.
java.security.keystoreexception: jks not found @ java.security.keystore.getinstance(keystore.java:899) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getstore(jssesocketfactory.java:424) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getkeystore(jssesocketfactory.java:339) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getkeymanagers(jssesocketfactory.java:597) @ org.apache.tomcat.util.net.jsse.jssesocketfactory.getkeymanagers(jssesocketfactory.java:537) @ org.apache.tomcat.util.net.nioendpoint.bind(nioendpoint.java:358) @ org.apache.tomcat.util.net.abstractendpoint.init(abstractendpoint.java:737) @ org.apache.coyote.abstractprotocol.init(abstractprotocol.java:457) @ org.apache.coyote.http11.abstracthttp11jsseprotocol.init(abstracthttp11jsseprotocol.java:120) @ org.apache.catalina.connector.connector.initinternal(connector.java:960) @ org.apache.catalina.util.lifecyclebase.init(lifecyclebase.java:102) @ org.apache.catalina.core.standardservice.initinternal(standardservice.java:567) @ org.apache.catalina.util.lifecyclebase.init(lifecyclebase.java:102) @ org.apache.catalina.core.standardserver.initinternal(standardserver.java:851) @ org.apache.catalina.util.lifecyclebase.init(lifecyclebase.java:102) @ org.apache.catalina.startup.catalina.load(catalina.java:576) @ org.apache.catalina.startup.catalina.load(catalina.java:599) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.apache.catalina.startup.bootstrap.load(bootstrap.java:310) @ org.apache.catalina.startup.bootstrap.main(bootstrap.java:484) caused by: java.security.nosuchalgorithmexception: no such algorithm: jks provider sunjsse @ sun.security.jca.getinstance.getservice(getinstance.java:87) @ sun.security.jca.getinstance.getinstance(getinstance.java:206) @ java.security.security.getimpl(security.java:698) @ java.security.keystore.getinstance(keystore.java:896) ... 22 more
Comments
Post a Comment