Section1Step: BuildServer Key:
%tomcat_home% command command line enter the following command ( jdk1.4 above with tools):
Keytool-genkey-alias tomcat-keyalg rsa-keypass changeit-storepass changeit-keystore server.keystore-validity 3600
User name Enter the domain name, such aslocalhost(for development or testing) orHostname.domainname (user-owned domain name), all other toEnterSkip, Final confirmation, at which point the%tomcat_home%under BuildServer.keystorefile
Note: Parameters -validity refers to the validity period of a certificate ( days ) , the default validity period is very short, only - days.
2.Import the certificate into theJDKin the certificate trust Library:
This step for tomcat ssl configuration is not required, but for cas SSO is required, otherwise the following error will occur: edu.yale.its.tp.cas.client.casauthenticationexception: unable to validate Proxyticketvalidator ...
The import process is divided into 2 Step , the first step is to export the certificate, and the second step is to import the certificate Truststore to the following command:
Keytool-export-trustcacerts-alias tomcat-file Server.cer-keystore Server.keystore-storepass Changeit
Keytool-import-trustcacerts-alias tomcat-file Server.cer-keystore%java_home%/jre/lib/security/cacerts-storepass C Hangeit
If prompted, enter Y you can do it.
Other Useful Keytool command (list all existing certificates in the trust certificate store and delete a certificate in the library):
Keytool-list-v-keystore D:/sdks/jdk1.5.0_11/jre/lib/security/cacerts
Keytool-delete-trustcacerts-alias Tomcat-keystore D:/sdks/jdk1.5.0_11/jre/lib/security/cacerts-storepass Changeit
3.ConfigurationTOMCAT:
write the following code in the E:\tomcat\tomcat1\conf\server.xml file
|
<connector port= "8443" protocol= "Org.apache.coyote.http11.Http11NioProtocol" sslenabled= "true"
maxthreads= "Scheme=" HTTPS "secure=" true "
Sslprotocol= "TLS"
keystorefile= "e:/ Tomcat/tomcat1/server.keystore "
keystorepass= "Changeit"/> |
Tomcat set HTTPS access