Abstract:
This instruction will guide you how to configure one-way SSL in tomcat 5.5
Instruction:
Step1: Running keytool
Open cmd and execute following command.
1 | keytool -genkey -alias tomcat -keyalg RSA -keypass yourpassword -storepass yourpassword -keystore C:/Tomcat55/keystore -validity 3600 |
Parameters:
-alias: Indicate a name which identify a entry in a keystore
-keyalg: Indicate encryption algorithm (Recommendation: RSA)
-keypass: Replace this param by your password.
-storepass: Replace this param by keypass password.
-keystore: The location where your store keystore file.
-validity: Indicate how many days will be valid for this keystore. (Default is 90 days.)
Step2: Config keytool
Complete following parameter as shown.
您的名字与姓氏是什么?
[Unknown]: localhost (Fill this blank with your granted domain or any others as testing)
您的组织单位名称是什么?
[Unknown]: Personal Testing. (Any String is OK.)
您的组织名称是什么?
[Unknown]: Personal Testing. (Any String is OK.)
您所在的城市或区域名称是什么?
[Unknown]: Beijing (Your city.)
您所在的州或省份名称是什么?
[Unknown]: Beijing (Your state.)
该单位的两字母国家代码是什么
[Unknown]: CN (Your country code.)
CN=localhost, OU=Personal Testing., O=Personal Testing., L=Beijing, ST=Beijing,
C=CN 正确吗?
[否]: y (Enter with ‘Y’ if everything is fine.)
After above, you should able to see a file named ‘keystore’ in C:/Tomcat55.
Step3: Config Server.xml
Open server.xml from C:/Tomcat55/conf. Then edit related configuration as below.
1 |