Kevin,
let's try again.
When I type keytool --help, one of the things it displays is
Code: Select all
-genkey [-v] [-alias <alias>] [-keyalg <keyalg>]
[-keysize <keysize>] [-sigalg <sigalg>]
[-dname <dname>] [-validity <valDays>]
[-keypass <keypass>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...
In that block, I see something like
that will take the validity of the certificate in days. Also, the passwords can be specified with the -keypass and -storepass options. In addition, the location of the store file can be specified with the -keystore option. Putting all this together, I now created a store with the following complete command:
Code: Select all
[root@rhel4 ~]# /usr/java/j2sdk1.4.2_09/bin/keytool -genkey -alias tomcat -keyalg RSA -validity 360 -keypass kevin123 -storepass kevin123 -keystore /root/kevin.keystore
What is your first and last name?
[Unknown]: mail.nesbitt.com
What is the name of your organizational unit?
[Unknown]: IT
What is the name of your organization?
[Unknown]: Nesbitt Engineering, Inc.
What is the name of your City or Locality?
[Unknown]: Whereever
What is the name of your State or Province?
[Unknown]: XX
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=mail.nesbitt.com, OU=IT, O="Nesbitt Engineering, Inc.", L=Whereever, ST=XX, C=US correct?
[no]: yes
So this created a keystore protected by the password "kevin123" with a validity of 360 days in a file called /root/kevin.keystore.
I now change the definition of the SSL connector in server.xml:
Code: Select all
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/root/kevin.keystore" keystorePass="kevin123" />
Please note the two added attributes giving the keystore filename and the keystore password.
I then restart tomcat, it comes up without problems and when checked with a browser, the certificate is valid until 19.10.2006 - which is 360 days from today.
I do assume that this helps now! :-)
-- Florian.