I am trying to get Tomcat 6.0.20 to work with SSL authentication. I used keytool to create a new certificate, put it in my user directory and set tomcat authentication (server.xml) for it:
(Omitted)
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" SSLRandomSeed="builtin" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="9090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="9091" />
<Connector port="9091" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="/home/media/.keystore"
keystorePass="123456"
clientAuth="false" sslProtocol="TLS" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="9091" />
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>
</Server>
However, the whist connection through http is fine, whenever I try to connect through port 9091 (https), I always get the message "connection was dropped." I never received a certificate or anything else, although there were no errors in catalina.out.
What could be wrong. Should I generate an OpenSSL key pair and import it in addition to creating and defining a keystore?