@@ -337,17 +337,6 @@ keys)</td>
337337<td><code>-v</code></td><td>Enable verbose output.</td>
338338</tr>
339339<tr>
340- <td><code>-keystore <keystore-name>.keystore</code></td><td>A name
341- for the keystore containing the private key.</td>
342- </tr>
343- <tr>
344- <td><code>-storepass <password></code></td><td><p>A password for the
345- keystore.</p><p>As a security precaution, do not include this option
346- in your command line unless you are working at a secure computer.
347- If not supplied, Keytool prompts you to enter the password. In this
348- way, your password is not stored in your shell history.</p></td>
349- </tr>
350- <tr>
351340<td><code>-alias <alias_name></code></td><td>An alias for the key. Only
352341the first 8 characters of the alias are used.</td>
353342</tr>
@@ -356,29 +345,43 @@ the first 8 characters of the alias are used.</td>
356345when generating the key. Both DSA and RSA are supported.</td>
357346</tr>
358347<tr>
348+ <td><code>-keysize <size></code></td><td>The size of each generated key
349+ (bits). If not supplied, Keytool uses a default key size of 1024 bits. In
350+ general, we recommend using a key size of 2048 bits or higher. </td>
351+ </tr>
352+ <tr>
359353<td><code>-dname <name></code></td><td><p>A Distinguished Name that describes
360354who created the key. The value is used as the issuer and subject fields in the
361355self-signed certificate. </p><p>Note that you do not need to specify this option
362356in the command line. If not supplied, Jarsigner prompts you to enter each
363357of the Distinguished Name fields (CN, OU, and so on).</p></td>
364358</tr>
365359<tr>
360+ <td><code>-keypass <password></code></td><td><p>The password for the
361+ key.</p> <p>As a security precaution, do not include this option in your command
362+ line. If not supplied, Keytool prompts you to enter the password. In this way,
363+ your password is not stored in your shell history.</p></td>
364+ </tr>
365+ <tr>
366366<td><code>-validity <valdays></code></td><td><p>The validity period for the
367367key, in days. </p><p><strong>Note:</strong> A value of 10000 or greater is recommended.</p></td>
368368</tr>
369369<tr>
370- <td><code>-keypass <password></code></td><td><p>The password for the key.</p>
371- <p>As a security precaution, do not include this option
372- in your command line unless you are working at a secure computer.
373- If not supplied, Keytool prompts you to enter the password. In this
374- way, your password is not stored in your shell history.</p></td>
370+ <td><code>-keystore <keystore-name>.keystore</code></td><td>A name
371+ for the keystore containing the private key.</td>
372+ </tr>
373+ <tr>
374+ <td><code>-storepass <password></code></td><td><p>A password for the
375+ keystore.</p><p>As a security precaution, do not include this option in your
376+ command line. If not supplied, Keytool prompts you to enter the password. In
377+ this way, your password is not stored in your shell history.</p></td>
375378</tr>
376379</table>
377380
378381<p>Here's an example of a Keytool command that generates a private key:</p>
379382
380383<pre>$ keytool -genkey -v -keystore my-release-key.keystore
381- -alias alias_name -keyalg RSA -validity 10000</pre>
384+ -alias alias_name -keyalg RSA -keysize 2048 - validity 10000</pre>
382385
383386<p>Running the example command above, Keytool prompts you to provide
384387passwords for the keystore and key, and to provide the Distinguished
0 commit comments