C:/Documents and Settings/masterqi> keytool-genkey-alias tomcat-keyalg RSA-Ke
Ystore tomcat.Keystore
InputKeystorePassword 000000
What is your first name and last name?
[UNKNOWN]: localhost <! -- Here is the domain. If it is a local machine, write localhost -->
What is the name of your organization?
[UNKNOWN]: MQ
What is your organization name?
[UNKNOWN]: MQ
What is the name of your city or region?
[UNKNOWN]: Shenzhen
What is the name of your state or province?
[UNKNOWN]: Guangdong
What is the two-letter country code for this unit?
[UNKNOWN]: CN
CN = localhost, ou = MQ, O = MQ, L = Shenzhen, St = Guangdong, c = Cn is it correct?
[No]: Y
Enter the master password of <Tomcat>
(IfKeystoreThe password is the same, press Enter): 000000
C:/Documents and Settings/masterqi> keytool-export-file myserver. cert-alias
MCAT-KeystoreTomcat.Keystore
InputKeystorePassword 000000
Authentication stored in files <myserver. Cert>
C:/Documents and Settings/masterqi> keytool-import-KeystoreC:/Java/jdk1.5.0 _ 0
4/JRE/lib/security/cacerts-file myserver. Cert
InputKeystorePassword: changeit <! -- The password here is always changeit, not the password entered above -->
Keytool error: Java. Lang. Exception: Authentication Not input, alias <mykey> already exists
C:/Documents and Settings/masterqi> keytool-import-KeystoreC:/Java/jdk1.5.0 _ 0
4/JRE/lib/security/cacerts-file myserver. cert-alias Tomcat
InputKeystorePassword: changeit <! -- The password here is fixed, not the 000000 above -->
Owner: Cn = localhost, ou = MQ, O = MQ, L = Shenzhen, St = Guangdong, c = Cn
Sender: Cn = localhost, ou = MQ, O = MQ, L = Shenzhen, St = Guangdong, c = Cn
No.: 4551d9ab
Validity Period: Wed Nov 08 21:20:43 CST 2006 to: Tue Feb 06 21:20:43 CST 2007
Authentication fingerprint:
MD5: 27: 64: 60: F7: 0C: 28: 40: 8e: 13: C4: 5A: 89: 74: 09: 84: A2
Sha1: C1: E8: A7: 69: 88: 6f: 52: Cf: 08: 98: 94: A6: 74: 74: 32: 9d: Fa: D4: 2f: 49
Trust this certification? [No]: Y
The authentication has been addedKeystoreMedium
<! ------- The next step is to configure Server. XML in Tomcat. I use tomcat. It is slightly different for Tomcat 5.5 ------->
<! --- The following configurations in server. XML are commented out. You can copy them and modify the keystorefile and keystorepass -->
<Connection Port = "8443"
Maxthreads = "150" minsparethreads = "25" maxsparethreads = "75"
Enablelookups = "false" disableuploadtimeout = "true"
Acceptcount = "100" DEBUG = "0" Scheme = "HTTPS" secure = "true"
Clientauth = "false" sslprotocol = "TLS">
<Factory classname = "org. Apache. Coyote. tomcat5.coyoteserversocketfactory"
Keystorefile = "tomcat.Keystore"
Keystorepass = "000000" clientauth = "false" protocol = "TLS"/>
</Connector>
<! -- The following is the tomcat5.5 configuration -->
<Connector Port = "8443" maxhttpheadersize = "8192"
Maxthreads = "150" minsparethreads = "25" maxsparethreads = "75"
Enablelookups = "false" disableuploadtimeout = "true"
Acceptcount = "100" Scheme = "HTTPS" secure = "true"
Keystorepass = "000000" keystorefile = "tomcat.Keystore"
Clientauth = "false" sslprotocol = "TLS"/>