78 % keytool -genkeypair -alias dummydsa -keyalg DSA -keysize 1024 \ |
78 % keytool -genkeypair -alias dummydsa -keyalg DSA -keysize 1024 \ |
79 -sigalg SHA256withDSA \ |
79 -sigalg SHA256withDSA \ |
80 -dname "CN=dummy.example.com, OU=Dummy, O=Dummy, L=Cupertino, ST=CA, C=US" \ |
80 -dname "CN=dummy.example.com, OU=Dummy, O=Dummy, L=Cupertino, ST=CA, C=US" \ |
81 -validity 3652 -keypass passphrase -keystore keystore -storepass passphrase |
81 -validity 3652 -keypass passphrase -keystore keystore -storepass passphrase |
82 |
82 |
|
83 Alias name: dummyecrsa |
|
84 -------------------- |
|
85 Creation date: Apr 13, 2018 |
|
86 Entry type: PrivateKeyEntry |
|
87 Certificate chain length: 2 |
|
88 Certificate[1]: |
|
89 Owner: CN=dummy.example.com, OU=Dummy, O=Dummy, L=Cupertino, ST=CA, C=US |
|
90 Issuer: CN=dummy.example.com, OU=Dummy, O=Dummy, L=Cupertino, ST=CA, C=US |
|
91 Serial number: 6f2d1faa |
|
92 Valid from: Fri Apr 13 16:20:55 CST 2018 until: Wed Apr 12 16:20:55 CST 2028 |
|
93 Version: 3 |
|
94 |
|
95 This can be generated by using keytool command: |
|
96 % keytool -genkeypair -alias dummyecrsa -keyalg EC -keysize 256 \ |
|
97 -keypass passphrase -storepass passphrase -keystore keystore \ |
|
98 -dname "CN=dummy.example.com, OU=Dummy, O=Dummy, L=Cupertino, ST=CA, C=US" |
|
99 % keytool -certreq -alias dummyecrsa -storepass passphrase -keystore keystore \ |
|
100 -file ecrsa.csr |
|
101 % keytool -gencert -alias dummy -storepass passphrase -keystore keystore \ |
|
102 -validity 3652 -infile ecrsa.csr -outfile ecrsa.cer |
|
103 % keytool -importcert -alias dummyecrsa -storepass passphrase -keystore keystore \ |
|
104 -file ecrsa.cer |
|
105 |
83 |
106 |
84 truststore entries |
107 truststore entries |
85 ================== |
108 ================== |
86 This key store contains only trusted certificate entries. The same |
109 This key store contains only trusted certificate entries. The same |
87 certificates are used in both keystore and truststore. |
110 certificates, except dummyecrsa, are used in both keystore and truststore. |
88 |
111 |
89 |
112 |
90 unknown_keystore |
113 unknown_keystore |
91 ================ |
114 ================ |
92 A keystore you can use when you don't want things to be verified. |
115 A keystore you can use when you don't want things to be verified. |