We had learn Java keystore with different Option from following Post Java Keytool Commands and also we had seen how to create simple keystore
file from this Post Generating Java KeyStore using Keytool utility.
In this Post we will see how to list the Java Keystore file or view Java keystore file.
-list Option is used to list the keystore file.
These are following Option we used while -list command
Options:
-rfc output in RFC style
-alias <alias> alias name of the entry to process
-keystore <keystore> keystore name
-storepass <arg> keystore password
-storetype <storetype> keystore type
-providername <providername> provider name
-providerclass <providerclass> provider class name
-providerarg <arg> provider argument
-providerpath <pathlist> provider classpath
-v verbose output
-protected password through protected mechanism
In post Generating Java KeyStore we saw creation of PrivateKeystore.jks file. Now we will list this one.
keytool -list -keystore PrivateKeystore.jks -storepass followme
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
privatekeystore, Jan 11, 2016, PrivateKeyEntry,
Certificate fingerprint (SHA1): 35:B7:99:DD:2A:56:80:4E:A0:8D:DF:89:20:44:03:A3:DE:AE:2F:02
If we want to gather more information on this use -v option.
keytool -list -keystore PrivateKeystore.jks -storepass followme -v
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: privatekeystore
Creation date: Jan 11, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=kalgyan.com, OU=Tech, O=Gyan, L=SS, ST=LS, C=US
Issuer: CN=kalgyan.com, OU=Tech, O=Gyan, L=SS, ST=LS, C=US
Serial number: 1e34b366
Valid from: Mon Jan 11 21:44:49 IST 2016 until: Sun Jan 01 21:44:49 IST 2017
Certificate fingerprints:
MD5: 3A:40:2C:FC:E0:3A:3A:D1:B3:A1:BB:F4:C7:6C:79:DE
SHA1: 35:B7:99:DD:2A:56:80:4E:A0:8D:DF:89:20:44:03:A3:DE:AE:2F:02
SHA256: F6:42:2C:84:74:CD:81:DB:C8:82:41:10:32:7B:A0:FC:E1:2B:52:D3:95:04:23:5B:DC:6A:90:99:93:1F:0D:F2
Signature algorithm name: SHA256withRSA
Version: 3
Extensions:
#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 2F A4 0F 86 3F 69 C7 11 BD A6 0D 78 9D 23 BE B8 /...?i.....x.#..
0010: 40 66 AE DA @f..
]
]
*******************************************
*******************************************
In this Post we will see how to list the Java Keystore file or view Java keystore file.
-list Option is used to list the keystore file.
These are following Option we used while -list command
Options:
-rfc output in RFC style
-alias <alias> alias name of the entry to process
-keystore <keystore> keystore name
-storepass <arg> keystore password
-storetype <storetype> keystore type
-providername <providername> provider name
-providerclass <providerclass> provider class name
-providerarg <arg> provider argument
-providerpath <pathlist> provider classpath
-v verbose output
-protected password through protected mechanism
In post Generating Java KeyStore we saw creation of PrivateKeystore.jks file. Now we will list this one.
keytool -list -keystore PrivateKeystore.jks -storepass followme
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
privatekeystore, Jan 11, 2016, PrivateKeyEntry,
Certificate fingerprint (SHA1): 35:B7:99:DD:2A:56:80:4E:A0:8D:DF:89:20:44:03:A3:DE:AE:2F:02
If we want to gather more information on this use -v option.
keytool -list -keystore PrivateKeystore.jks -storepass followme -v
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: privatekeystore
Creation date: Jan 11, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=kalgyan.com, OU=Tech, O=Gyan, L=SS, ST=LS, C=US
Issuer: CN=kalgyan.com, OU=Tech, O=Gyan, L=SS, ST=LS, C=US
Serial number: 1e34b366
Valid from: Mon Jan 11 21:44:49 IST 2016 until: Sun Jan 01 21:44:49 IST 2017
Certificate fingerprints:
MD5: 3A:40:2C:FC:E0:3A:3A:D1:B3:A1:BB:F4:C7:6C:79:DE
SHA1: 35:B7:99:DD:2A:56:80:4E:A0:8D:DF:89:20:44:03:A3:DE:AE:2F:02
SHA256: F6:42:2C:84:74:CD:81:DB:C8:82:41:10:32:7B:A0:FC:E1:2B:52:D3:95:04:23:5B:DC:6A:90:99:93:1F:0D:F2
Signature algorithm name: SHA256withRSA
Version: 3
Extensions:
#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 2F A4 0F 86 3F 69 C7 11 BD A6 0D 78 9D 23 BE B8 /...?i.....x.#..
0010: 40 66 AE DA @f..
]
]
*******************************************
*******************************************
0 Comments