-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
beta2
-
generic
-
generic
Name: ssT124754 Date: 03/14/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
Using keytool with -genkey -validity option it is possible to generate a
certificate with a long validity. With -selfcert, validity is limited to around
1450 days, after which the validity on the certificate wraps round to 1997!
Exactly the same behaviour occurs on "Solaris_JDK_1.2.1_04c, native threads,
sunwjit"
The example below shows output running on Win 2000 (but is the same on Win 95
and Solaris 2.8):
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-1999 Microsoft Corp.
C:\>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
C:\>keytool -genkey -validity 1500
Enter keystore password: testpwd
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is <CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown> correct
?
[no]: y
Enter key password for <mykey>
(RETURN if same as keystore password):
C:\>keytool -list -v
Enter keystore password: testpwd
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry:
Alias name: mykey
Creation date: Thu Mar 01 18:05:45 GMT+00:00 2001
Entry type: keyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Issuer: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Serial number: 3a9e8f71
Valid from: Thu Mar 01 18:05:37 GMT+00:00 2001 until: Sat Apr 09 19:05:37 GMT+01
:00 2005
Certificate fingerprints:
MD5: 5C:46:AA:85:48:A3:A1:8C:7E:F6:A7:B7:02:A8:0F:5B
SHA1: 8E:A5:65:0F:94:CA:B4:F1:CA:3C:EF:28:7C:35:35:30:07:F7:0B:93
*******************************************
*******************************************
C:\>keytool -selfcert -validity 1500
Enter keystore password: testpwd
C:\>keytool -list -v
Enter keystore password: testpwd
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry:
Alias name: mykey
Creation date: Thu Mar 01 18:07:31 GMT+00:00 2001
Entry type: keyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Issuer: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Serial number: 3a9e8fdc
Valid from: Thu Mar 01 18:07:24 GMT+00:00 2001 until: Sat Feb 08 03:20:06 GMT+00
:00 1997
Certificate fingerprints:
MD5: A3:D4:A4:22:3F:04:FB:80:E3:77:82:A8:DD:39:D5:3C
SHA1: 3A:6F:98:04:E4:15:97:88:3D:D7:FB:5A:12:DF:BD:77:3F:AB:9E:77
*******************************************
*******************************************
(Review ID: 117947)
======================================================================