src/java.base/share/man/keytool.1
author dfuchs
Thu, 07 Nov 2019 16:18:02 +0000
changeset 58968 7f1daafda27b
parent 55140 d4890c3721be
permissions -rw-r--r--
8233403: Improve verbosity of some httpclient tests Summary: improve the verbosity of some httpclient tests to help diagnosis of intermittent failures. Also fixes ShortRequestBody test. Reviewed-by: chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
     1
.\"t
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
     2
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
     3
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
     4
.\"
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
     5
.\" This code is free software; you can redistribute it and/or modify it
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
     6
.\" under the terms of the GNU General Public License version 2 only, as
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
     7
.\" published by the Free Software Foundation.
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
     8
.\"
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
     9
.\" This code is distributed in the hope that it will be useful, but WITHOUT
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    10
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    11
.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    12
.\" version 2 for more details (a copy is included in the LICENSE file that
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    13
.\" accompanied this code).
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    14
.\"
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    15
.\" You should have received a copy of the GNU General Public License version
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    16
.\" 2 along with this work; if not, write to the Free Software Foundation,
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    17
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    18
.\"
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    19
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    20
.\" or visit www.oracle.com if you need additional information or have any
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    21
.\" questions.
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
    22
.\"
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    23
.\" Automatically generated by Pandoc 2.3.1
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    24
.\"
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    25
.TH "KEYTOOL" "1" "2019" "JDK 13" "JDK Commands"
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    26
.hy
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    27
.SH NAME
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    28
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    29
keytool \- a key and certificate management utility
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    30
.SH SYNOPSIS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    31
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    32
\f[CB]keytool\f[R] [\f[I]commands\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    33
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    34
.B \f[I]commands\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    35
Commands for \f[CB]keytool\f[R] include the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    36
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    37
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    38
\f[CB]\-certreq\f[R]: Generates a certificate request
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    39
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    40
\f[CB]\-changealias\f[R]: Changes an entry\[aq]s alias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    41
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    42
\f[CB]\-delete\f[R]: Deletes an entry
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    43
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    44
\f[CB]\-exportcert\f[R]: Exports certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    45
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    46
\f[CB]\-genkeypair\f[R]: Generates a key pair
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    47
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    48
\f[CB]\-genseckey\f[R]: Generates a secret key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    49
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    50
\f[CB]\-gencert\f[R]: Generates a certificate from a certificate request
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    51
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    52
\f[CB]\-importcert\f[R]: Imports a certificate or a certificate chain
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    53
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    54
\f[CB]\-importpass\f[R]: Imports a password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    55
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    56
\f[CB]\-importkeystore\f[R]: Imports one or all entries from another
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    57
keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    58
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    59
\f[CB]\-keypasswd\f[R]: Changes the key password of an entry
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    60
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    61
\f[CB]\-list\f[R]: Lists entries in a keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    62
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    63
\f[CB]\-printcert\f[R]: Prints the content of a certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    64
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    65
\f[CB]\-printcertreq\f[R]: Prints the content of a certificate request
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    66
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    67
\f[CB]\-printcrl\f[R]: Prints the content of a Certificate Revocation List
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    68
(CRL) file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    69
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    70
\f[CB]\-storepasswd\f[R]: Changes the store password of a keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    71
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    72
\f[CB]\-showinfo\f[R]: Displays security\-related information
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    73
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    74
See \f[B]Commands and Options\f[R] for a description of these commands
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    75
with their options.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    76
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    77
.SH DESCRIPTION
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    78
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    79
The \f[CB]keytool\f[R] command is a key and certificate management
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    80
utility.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    81
It enables users to administer their own public/private key pairs and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    82
associated certificates for use in self\-authentication (where a user
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    83
authenticates themselves to other users and services) or data integrity
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    84
and authentication services, by using digital signatures.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    85
The \f[CB]keytool\f[R] command also enables users to cache the public keys
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    86
(in the form of certificates) of their communicating peers.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    87
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    88
A certificate is a digitally signed statement from one entity (person,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    89
company, and so on), which says that the public key (and some other
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    90
information) of some other entity has a particular value.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    91
When data is digitally signed, the signature can be verified to check
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    92
the data integrity and authenticity.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    93
Integrity means that the data hasn\[aq]t been modified or tampered with,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    94
and authenticity means that the data comes from the individual who
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    95
claims to have created and signed it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    96
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    97
The \f[CB]keytool\f[R] command also enables users to administer secret
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    98
keys and passphrases used in symmetric encryption and decryption (Data
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    99
Encryption Standard).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   100
It can also display other security\-related information.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   101
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   102
The \f[CB]keytool\f[R] command stores the keys and certificates in a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   103
keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   104
.SH COMMAND AND OPTION NOTES
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   105
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   106
The following notes apply to the descriptions in \f[B]Commands and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   107
Options\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   108
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   109
All command and option names are preceded by a hyphen sign
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   110
(\f[CB]\-\f[R]).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   111
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   112
Only one command can be provided.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   113
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   114
Options for each command can be provided in any order.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   115
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   116
There are two kinds of options, one is single\-valued which should be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   117
only provided once.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   118
If a single\-valued option is provided multiple times, the value of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   119
last one is used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   120
The other type is multi\-valued, which can be provided multiple times
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   121
and all values are used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   122
The only multi\-valued option currently supported is the \f[CB]\-ext\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   123
option used to generate X.509v3 certificate extensions.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   124
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   125
All items not italicized or in braces ({ }) or brackets ([ ]) are
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   126
required to appear as is.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   127
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   128
Braces surrounding an option signify that a default value is used when
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   129
the option isn\[aq]t specified on the command line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   130
Braces are also used around the \f[CB]\-v\f[R], \f[CB]\-rfc\f[R], and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   131
\f[CB]\-J\f[R] options, which have meaning only when they appear on the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   132
command line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   133
They don\[aq]t have any default values.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   134
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   135
Brackets surrounding an option signify that the user is prompted for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   136
values when the option isn\[aq]t specified on the command line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   137
For the \f[CB]\-keypass\f[R] option, if you don\[aq]t specify the option
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   138
on the command line, then the \f[CB]keytool\f[R] command first attempts to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   139
use the keystore password to recover the private/secret key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   140
If this attempt fails, then the \f[CB]keytool\f[R] command prompts you for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   141
the private/secret key password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   142
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   143
Items in italics (option values) represent the actual values that must
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   144
be supplied.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   145
For example, here is the format of the \f[CB]\-printcert\f[R] command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   146
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   147
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   148
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   149
\f[CB]keytool\ \-printcert\f[R] {\f[CB]\-file\f[R] \f[I]cert_file\f[R]}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   150
{\f[CB]\-v\f[R]}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   151
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   152
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   153
When you specify a \f[CB]\-printcert\f[R] command, replace
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   154
\f[I]cert_file\f[R] with the actual file name, as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   155
\f[CB]keytool\ \-printcert\ \-file\ VScert.cer\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   156
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   157
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   158
Option values must be enclosed in quotation marks when they contain a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   159
blank (space).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   160
.SH COMMANDS AND OPTIONS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   161
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   162
The keytool commands and their options can be grouped by the tasks that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   163
they perform.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   164
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   165
\f[B]Commands for Creating or Adding Data to the Keystore\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   166
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   167
\f[CB]\-gencert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   168
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   169
\f[CB]\-genkeypair\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   170
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   171
\f[CB]\-genseckey\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   172
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   173
\f[CB]\-importcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   174
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   175
\f[CB]\-importpass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   176
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   177
\f[B]Commands for Importing Contents from Another Keystore\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   178
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   179
\f[CB]\-importkeystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   180
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   181
\f[B]Commands for Generating a Certificate Request\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   182
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   183
\f[CB]\-certreq\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   184
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   185
\f[B]Commands for Exporting Data\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   186
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   187
\f[CB]\-exportcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   188
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   189
\f[B]Commands for Displaying Data\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   190
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   191
\f[CB]\-list\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   192
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   193
\f[CB]\-printcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   194
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   195
\f[CB]\-printcertreq\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   196
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   197
\f[CB]\-printcrl\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   198
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   199
\f[B]Commands for Managing the Keystore\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   200
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   201
\f[CB]\-storepasswd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   202
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   203
\f[CB]\-keypasswd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   204
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   205
\f[CB]\-delete\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   206
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   207
\f[CB]\-changealias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   208
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   209
\f[B]Commands for Displaying Security\-related Information\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   210
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   211
\f[CB]\-showinfo\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   212
.SH COMMANDS FOR CREATING OR ADDING DATA TO THE KEYSTORE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   213
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   214
.B \f[CB]\-gencert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   215
The following are the available options for the \f[CB]\-gencert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   216
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   217
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   218
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   219
{\f[CB]\-rfc\f[R]}: Output in RFC (Request For Comment) style
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   220
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   221
{\f[CB]\-infile\f[R] \f[I]infile\f[R]}: Input file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   222
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   223
{\f[CB]\-outfile\f[R] \f[I]outfile\f[R]}: Output file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   224
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   225
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   226
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   227
{\f[CB]\-sigalg\f[R] \f[I]sigalg\f[R]}: Signature algorithm name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   228
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   229
{\f[CB]\-dname\f[R] \f[I]dname\f[R]}: Distinguished name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   230
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   231
{\f[CB]\-startdate\f[R] \f[I]startdate\f[R]}: Certificate validity start
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   232
date and time
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   233
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   234
{\f[CB]\-ext\f[R] \f[I]ext\f[R]}*: X.509 extension
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   235
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   236
{\f[CB]\-validity\f[R] \f[I]days\f[R]}: Validity number of days
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   237
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   238
[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   239
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   240
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   241
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   242
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   243
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   244
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   245
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   246
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   247
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   248
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   249
\f[I]arg\f[R]]}: Adds a security provider by name (such as SunPKCS11)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   250
with an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   251
The value of the security provider is the name of a security provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   252
that is defined in a module.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   253
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   254
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   255
For example,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   256
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   257
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   258
\f[CB]keytool\ \-addprovider\ SunPKCS11\ \-providerarg\ some.cfg\ ...\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   259
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   260
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   261
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   262
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   263
For compatibility reasons, the SunPKCS11 and OracleUcrypto providers can
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   264
still be loaded with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   265
\f[CB]\-providerclass\ sun.security.pkcs11.SunPKCS11\f[R] and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   266
\f[CB]\-providerclass\ com.oracle.security.crypto.UcryptoProvider\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   267
even if they are now defined in modules.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   268
These are the only modules included in JDK that need a configuration,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   269
and therefore the most widely used with the \f[CB]\-providerclass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   270
option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   271
For legacy security providers located on classpath and loaded by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   272
reflection, \f[CB]\-providerclass\f[R] should still be used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   273
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   274
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   275
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   276
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   277
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   278
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   279
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   280
For example, if \f[CB]MyProvider\f[R] is a legacy provider loaded via
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   281
reflection,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   282
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   283
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   284
\f[CB]keytool\ \-providerclass\ com.example.MyProvider\ ...\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   285
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   286
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   287
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   288
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   289
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   290
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   291
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   292
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   293
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   294
Use the \f[CB]\-gencert\f[R] command to generate a certificate as a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   295
response to a certificate request file (which can be created by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   296
\f[CB]keytool\ \-certreq\f[R] command).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   297
The command reads the request either from \f[I]infile\f[R] or, if
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   298
omitted, from the standard input, signs it by using the alias\[aq]s
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   299
private key, and outputs the X.509 certificate into either
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   300
\f[I]outfile\f[R] or, if omitted, to the standard output.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   301
When \f[CB]\-rfc\f[R] is specified, the output format is Base64\-encoded
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   302
PEM; otherwise, a binary DER is created.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   303
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   304
The \f[CB]\-sigalg\f[R] value specifies the algorithm that should be used
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   305
to sign the certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   306
The \f[I]startdate\f[R] argument is the start time and date that the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   307
certificate is valid.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   308
The \f[I]days\f[R] argument tells the number of days for which the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   309
certificate should be considered valid.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   310
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   311
When \f[I]dname\f[R] is provided, it is used as the subject of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   312
generated certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   313
Otherwise, the one from the certificate request is used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   314
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   315
The \f[CB]\-ext\f[R] value shows what X.509 extensions will be embedded in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   316
the certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   317
Read \f[B]Common Command Options\f[R] for the grammar of \f[CB]\-ext\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   318
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   319
The \f[CB]\-gencert\f[R] option enables you to create certificate chains.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   320
The following example creates a certificate, \f[CB]e1\f[R], that contains
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   321
three certificates in its certificate chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   322
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   323
The following commands creates four key pairs named \f[CB]ca\f[R],
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   324
\f[CB]ca1\f[R], \f[CB]ca2\f[R], and \f[CB]e1\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   325
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   326
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   327
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   328
keytool\ \-alias\ ca\ \-dname\ CN=CA\ \-genkeypair
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   329
keytool\ \-alias\ ca1\ \-dname\ CN=CA\ \-genkeypair
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   330
keytool\ \-alias\ ca2\ \-dname\ CN=CA\ \-genkeypair
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   331
keytool\ \-alias\ e1\ \-dname\ CN=E1\ \-genkeypair
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   332
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   333
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   334
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   335
The following two commands create a chain of signed certificates;
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   336
\f[CB]ca\f[R] signs \f[CB]ca1\f[R] and \f[CB]ca1\f[R] signs \f[CB]ca2\f[R], all
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   337
of which are self\-issued:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   338
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   339
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   340
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   341
keytool\ \-alias\ ca1\ \-certreq\ |
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   342
\ \ \ \ keytool\ \-alias\ ca\ \-gencert\ \-ext\ san=dns:ca1\ |
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   343
\ \ \ \ keytool\ \-alias\ ca1\ \-importcert
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   344
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   345
keytool\ \-alias\ ca2\ \-certreq\ |
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   346
\ \ \ \ keytool\ \-alias\ ca1\ \-gencert\ \-ext\ san=dns:ca2\ |
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   347
\ \ \ \ keytool\ \-alias\ ca2\ \-importcert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   348
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   349
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   350
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   351
The following command creates the certificate \f[CB]e1\f[R] and stores it
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   352
in the \f[CB]e1.cert\f[R] file, which is signed by \f[CB]ca2\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   353
As a result, \f[CB]e1\f[R] should contain \f[CB]ca\f[R], \f[CB]ca1\f[R], and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   354
\f[CB]ca2\f[R] in its certificate chain:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   355
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   356
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   357
\f[CB]keytool\ \-alias\ e1\ \-certreq\ |\ keytool\ \-alias\ ca2\ \-gencert\ >\ e1.cert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   358
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   359
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   360
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   361
.B \f[CB]\-genkeypair\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   362
The following are the available options for the \f[CB]\-genkeypair\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   363
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   364
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   365
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   366
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   367
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   368
{\f[CB]\-keyalg\f[R] \f[I]alg\f[R]}: Key algorithm name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   369
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   370
{\f[CB]\-keysize\f[R] \f[I]size\f[R]}: Key bit size
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   371
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   372
{\f[CB]\-groupname\f[R] \f[I]name\f[R]}: Group name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   373
For example, an Elliptic Curve name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   374
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   375
{\f[CB]\-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   376
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   377
[\f[CB]\-dname\f[R] \f[I]name\f[R]]: Distinguished name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   378
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   379
{\f[CB]\-startdate\f[R] \f[I]date\f[R]}: Certificate validity start date
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   380
and time
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   381
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   382
[\f[CB]\-ext\f[R] \f[I]value\f[R]}*: X.509 extension
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   383
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   384
{\f[CB]\-validity\f[R] \f[I]days\f[R]}: Validity number of days
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   385
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   386
[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   387
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   388
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   389
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   390
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   391
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   392
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   393
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   394
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   395
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   396
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   397
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   398
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   399
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   400
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   401
\f[I]arg\f[R]] }: Add security provider by fully qualified class name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   402
with an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   403
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   404
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   405
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   406
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   407
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   408
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   409
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   410
Use the \f[CB]\-genkeypair\f[R] command to generate a key pair (a public
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   411
key and associated private key).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   412
Wraps the public key in an X.509 v3 self\-signed certificate, which is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   413
stored as a single\-element certificate chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   414
This certificate chain and the private key are stored in a new keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   415
entry that is identified by its alias.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   416
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   417
The \f[CB]\-keyalg\f[R] value specifies the algorithm to be used to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   418
generate the key pair, and the \f[CB]\-keysize\f[R] value specifies the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   419
size of each key to be generated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   420
The \f[CB]\-sigalg\f[R] value specifies the algorithm that should be used
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   421
to sign the self\-signed certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   422
This algorithm must be compatible with the \f[CB]\-keyalg\f[R] value.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   423
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   424
The \f[CB]\-groupname\f[R] value specifies the named group (for example,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   425
the standard or predefined name of an Elliptic Curve) of the key to be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   426
generated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   427
Only one of \f[CB]\-groupname\f[R] and \f[CB]\-keysize\f[R] can be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   428
specified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   429
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   430
The \f[CB]\-dname\f[R] value specifies the X.500 Distinguished Name to be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   431
associated with the value of \f[CB]\-alias\f[R], and is used as the issuer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   432
and subject fields in the self\-signed certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   433
If a distinguished name is not provided at the command line, then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   434
user is prompted for one.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   435
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   436
The value of \f[CB]\-keypass\f[R] is a password used to protect the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   437
private key of the generated key pair.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   438
If a password is not provided, then the user is prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   439
If you press the \f[B]Return\f[R] key at the prompt, then the key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   440
password is set to the same password as the keystore password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   441
The \f[CB]\-keypass\f[R] value must have at least six characters.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   442
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   443
The value of \f[CB]\-startdate\f[R] specifies the issue time of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   444
certificate, also known as the "Not Before" value of the X.509
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   445
certificate\[aq]s Validity field.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   446
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   447
The option value can be set in one of these two forms:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   448
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   449
([\f[CB]+\-\f[R]]\f[I]nnn\f[R][\f[CB]ymdHMS\f[R]])+
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   450
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   451
[\f[I]yyyy\f[R]\f[CB]/\f[R]\f[I]mm\f[R]\f[CB]/\f[R]\f[I]dd\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   452
[\f[I]HH\f[R]\f[CB]:\f[R]\f[I]MM\f[R]\f[CB]:\f[R]\f[I]SS\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   453
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   454
With the first form, the issue time is shifted by the specified value
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   455
from the current time.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   456
The value is a concatenation of a sequence of subvalues.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   457
Inside each subvalue, the plus sign (+) means shift forward, and the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   458
minus sign (\-) means shift backward.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   459
The time to be shifted is \f[I]nnn\f[R] units of years, months, days,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   460
hours, minutes, or seconds (denoted by a single character of \f[CB]y\f[R],
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   461
\f[CB]m\f[R], \f[CB]d\f[R], \f[CB]H\f[R], \f[CB]M\f[R], or \f[CB]S\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   462
respectively).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   463
The exact value of the issue time is calculated by using the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   464
\f[CB]java.util.GregorianCalendar.add(int\ field,\ int\ amount)\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   465
method on each subvalue, from left to right.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   466
For example, the issue time can be specified by:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   467
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   468
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   469
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   470
Calendar\ c\ =\ new\ GregorianCalendar();
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   471
c.add(Calendar.YEAR,\ \-1);
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   472
c.add(Calendar.MONTH,\ 1);
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   473
c.add(Calendar.DATE,\ \-1);
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   474
return\ c.getTime()
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   475
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   476
.fi
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   477
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   478
With the second form, the user sets the exact issue time in two parts,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   479
year/month/day and hour:minute:second (using the local time zone).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   480
The user can provide only one part, which means the other part is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   481
same as the current date (or time).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   482
The user must provide the exact number of digits shown in the format
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   483
definition (padding with 0 when shorter).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   484
When both date and time are provided, there is one (and only one) space
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   485
character between the two parts.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   486
The hour should always be provided in 24\-hour format.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   487
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   488
When the option isn\[aq]t provided, the start date is the current time.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   489
The option can only be provided one time.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   490
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   491
The value of \f[I]date\f[R] specifies the number of days (starting at the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   492
date specified by \f[CB]\-startdate\f[R], or the current date when
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   493
\f[CB]\-startdate\f[R] isn\[aq]t specified) for which the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   494
should be considered valid.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   495
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   496
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   497
.B \f[CB]\-genseckey\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   498
The following are the available options for the \f[CB]\-genseckey\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   499
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   500
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   501
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   502
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   503
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   504
[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   505
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   506
{\f[CB]\-keyalg\f[R] \f[I]alg\f[R]}: Key algorithm name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   507
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   508
{\f[CB]\-keysize\f[R] \f[I]size\f[R]}: Key bit size
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   509
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   510
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   511
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   512
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   513
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   514
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   515
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   516
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   517
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   518
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   519
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   520
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   521
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   522
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   523
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   524
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   525
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   526
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   527
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   528
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   529
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   530
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   531
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   532
Use the \f[CB]\-genseckey\f[R] command to generate a secret key and store
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   533
it in a new \f[CB]KeyStore.SecretKeyEntry\f[R] identified by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   534
\f[CB]alias\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   535
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   536
The value of \f[CB]\-keyalg\f[R] specifies the algorithm to be used to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   537
generate the secret key, and the value of \f[CB]\-keysize\f[R] specifies
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   538
the size of the key that is generated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   539
The \f[CB]\-keypass\f[R] value is a password that protects the secret key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   540
If a password is not provided, then the user is prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   541
If you press the \f[B]Return\f[R] key at the prompt, then the key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   542
password is set to the same password that is used for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   543
\f[CB]\-keystore\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   544
The \f[CB]\-keypass\f[R] value must contain at least six characters.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   545
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   546
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   547
.B \f[CB]\-importcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   548
The following are the available options for the \f[CB]\-importcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   549
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   550
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   551
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   552
{\f[CB]\-noprompt\f[R]}: Do not prompt
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   553
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   554
{\f[CB]\-trustcacerts\f[R]}: Trust certificates from cacerts
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   555
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   556
{\f[CB]\-protected\f[R]}: Password is provided through protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   557
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   558
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   559
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   560
{\f[CB]\-file\f[R] \f[I]file\f[R]}: Input file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   561
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   562
[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   563
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   564
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   565
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   566
{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   567
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   568
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   569
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   570
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   571
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   572
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   573
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   574
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   575
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   576
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   577
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   578
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   579
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   580
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   581
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   582
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   583
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   584
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   585
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   586
Use the \f[CB]\-importcert\f[R] command to read the certificate or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   587
certificate chain (where the latter is supplied in a PKCS#7 formatted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   588
reply or in a sequence of X.509 certificates) from \f[CB]\-file\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   589
\f[I]file\f[R], and store it in the \f[CB]keystore\f[R] entry identified by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   590
\f[CB]\-alias\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   591
If \f[CB]\-file\f[R] \f[I]file\f[R] is not specified, then the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   592
or certificate chain is read from \f[CB]stdin\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   593
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   594
The \f[CB]keytool\f[R] command can import X.509 v1, v2, and v3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   595
certificates, and PKCS#7 formatted certificate chains consisting of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   596
certificates of that type.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   597
The data to be imported must be provided either in binary encoding
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   598
format or in printable encoding format (also known as Base64 encoding)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   599
as defined by the Internet RFC 1421 standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   600
In the latter case, the encoding must be bounded at the beginning by a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   601
string that starts with \f[CB]\-\-\-\-\-BEGIN\f[R], and bounded at the end
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   602
by a string that starts with \f[CB]\-\-\-\-\-END\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   603
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   604
You import a certificate for two reasons: To add it to the list of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   605
trusted certificates, and to import a certificate reply received from a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   606
certificate authority (CA) as the result of submitting a Certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   607
Signing Request (CSR) to that CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   608
See the \f[CB]\-certreq\f[R] command in \f[B]Commands for Generating a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   609
Certificate Request\f[R].
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   610
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   611
The type of import is indicated by the value of the \f[CB]\-alias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   612
option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   613
If the alias doesn\[aq]t point to a key entry, then the \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   614
command assumes you are adding a trusted certificate entry.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   615
In this case, the alias shouldn\[aq]t already exist in the keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   616
If the alias does exist, then the \f[CB]keytool\f[R] command outputs an
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   617
error because a trusted certificate already exists for that alias, and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   618
doesn\[aq]t import the certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   619
If \f[CB]\-alias\f[R] points to a key entry, then the \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   620
command assumes that you\[aq]re importing a certificate reply.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   621
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   622
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   623
.B \f[CB]\-importpass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   624
The following are the available options for the \f[CB]\-importpass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   625
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   626
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   627
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   628
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   629
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   630
[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   631
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   632
{\f[CB]\-keyalg\f[R] \f[I]alg\f[R]}: Key algorithm name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   633
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   634
{\f[CB]\-keysize\f[R] \f[I]size\f[R]}: Key bit size
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   635
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   636
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   637
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   638
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   639
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   640
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   641
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   642
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   643
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   644
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   645
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   646
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   647
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   648
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   649
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   650
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   651
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   652
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   653
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   654
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   655
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   656
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   657
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   658
Use the \f[CB]\-importpass\f[R] command to imports a passphrase and store
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   659
it in a new \f[CB]KeyStore.SecretKeyEntry\f[R] identified by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   660
\f[CB]\-alias\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   661
The passphrase may be supplied via the standard input stream; otherwise
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   662
the user is prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   663
The \f[CB]\-keypass\f[R] option provides a password to protect the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   664
imported passphrase.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   665
If a password is not provided, then the user is prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   666
If you press the \f[B]Return\f[R] key at the prompt, then the key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   667
password is set to the same password as that used for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   668
\f[CB]keystore\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   669
The \f[CB]\-keypass\f[R] value must contain at least six characters.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   670
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   671
.SH COMMANDS FOR IMPORTING CONTENTS FROM ANOTHER KEYSTORE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   672
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   673
.B \f[CB]\-importkeystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   674
The following are the available options for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   675
\f[CB]\-importkeystore\f[R] command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   676
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   677
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   678
{\f[CB]\-srckeystore\f[R] \f[I]keystore\f[R]}: Source keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   679
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   680
{\f[CB]\-destkeystore\f[R] \f[I]keystore\f[R]}: Destination keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   681
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   682
{\f[CB]\-srcstoretype\f[R] \f[I]type\f[R]}: Source keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   683
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   684
{\f[CB]\-deststoretype\f[R] \f[I]type\f[R]}: Destination keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   685
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   686
[\f[CB]\-srcstorepass\f[R] \f[I]arg\f[R]]: Source keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   687
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   688
[\f[CB]\-deststorepass\f[R] \f[I]arg\f[R]]: Destination keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   689
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   690
{\f[CB]\-srcprotected\f[R]}: Source keystore password protected
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   691
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   692
{\f[CB]\-destprotected\f[R]}: Destination keystore password protected
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   693
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   694
{\f[CB]\-srcprovidername\f[R] \f[I]name\f[R]}: Source keystore provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   695
name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   696
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   697
{\f[CB]\-destprovidername\f[R] \f[I]name\f[R]}: Destination keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   698
provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   699
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   700
{\f[CB]\-srcalias\f[R] \f[I]alias\f[R]}: Source alias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   701
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   702
{\f[CB]\-destalias\f[R] \f[I]alias\f[R]}: Destination alias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   703
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   704
[\f[CB]\-srckeypass\f[R] \f[I]arg\f[R]]: Source key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   705
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   706
[\f[CB]\-destkeypass\f[R] \f[I]arg\f[R]]: Destination key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   707
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   708
{\f[CB]\-noprompt\f[R]}: Do not prompt
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   709
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   710
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   711
\f[I]arg\f[R]]: Add security provider by name (such as SunPKCS11) with an
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   712
optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   713
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   714
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   715
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   716
an optional configure argument
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   717
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   718
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   719
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   720
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   721
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   722
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   723
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   724
This is the first line of all options:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   725
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   726
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   727
\f[CB]\-srckeystore\f[R] \f[I]keystore\f[R] \f[CB]\-destkeystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   728
\f[I]keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   729
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   730
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   731
Use the \f[CB]\-importkeystore\f[R] command to import a single entry or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   732
all entries from a source keystore to a destination keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   733
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   734
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   735
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   736
If you do not specify \f[CB]\-destkeystore\f[R] when using the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   737
\f[CB]keytool\ \-importkeystore\f[R] command, then the default keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   738
used is \f[CB]$HOME/.keystore\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   739
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   740
When the \f[CB]\-srcalias\f[R] option is provided, the command imports the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   741
single entry identified by the alias to the destination keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   742
If a destination alias isn\[aq]t provided with \f[CB]\-destalias\f[R],
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   743
then \f[CB]\-srcalias\f[R] is used as the destination alias.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   744
If the source entry is protected by a password, then
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   745
\f[CB]\-srckeypass\f[R] is used to recover the entry.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   746
If \f[CB]\-srckeypass\f[R] isn\[aq]t provided, then the \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   747
command attempts to use \f[CB]\-srcstorepass\f[R] to recover the entry.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   748
If \f[CB]\-srcstorepass\f[R] is not provided or is incorrect, then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   749
user is prompted for a password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   750
The destination entry is protected with \f[CB]\-destkeypass\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   751
If \f[CB]\-destkeypass\f[R] isn\[aq]t provided, then the destination entry
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   752
is protected with the source entry password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   753
For example, most third\-party tools require \f[CB]storepass\f[R] and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   754
\f[CB]keypass\f[R] in a PKCS #12 keystore to be the same.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   755
To create a PKCS#12 keystore for these tools, always specify a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   756
\f[CB]\-destkeypass\f[R] that is the same as \f[CB]\-deststorepass\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   757
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   758
If the \f[CB]\-srcalias\f[R] option isn\[aq]t provided, then all entries
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   759
in the source keystore are imported into the destination keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   760
Each destination entry is stored under the alias from the source entry.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   761
If the source entry is protected by a password, then
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   762
\f[CB]\-srcstorepass\f[R] is used to recover the entry.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   763
If \f[CB]\-srcstorepass\f[R] is not provided or is incorrect, then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   764
user is prompted for a password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   765
If a source keystore entry type isn\[aq]t supported in the destination
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   766
keystore, or if an error occurs while storing an entry into the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   767
destination keystore, then the user is prompted either to skip the entry
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   768
and continue or to quit.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   769
The destination entry is protected with the source entry password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   770
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   771
If the destination alias already exists in the destination keystore,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   772
then the user is prompted either to overwrite the entry or to create a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   773
new entry under a different alias name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   774
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   775
If the \f[CB]\-noprompt\f[R] option is provided, then the user isn\[aq]t
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   776
prompted for a new destination alias.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   777
Existing entries are overwritten with the destination alias name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   778
Entries that can\[aq]t be imported are skipped and a warning is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   779
displayed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   780
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   781
.SH COMMANDS FOR GENERATING A CERTIFICATE REQUEST
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   782
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   783
.B \f[CB]\-certreq\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   784
The following are the available options for the \f[CB]\-certreq\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   785
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   786
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   787
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   788
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   789
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   790
{\f[CB]\-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   791
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   792
{\f[CB]\-file\f[R] \f[I]file\f[R]}: Output file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   793
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   794
[ \f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   795
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   796
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   797
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   798
{\f[CB]\-dname\f[R] \f[I]name\f[R]}: Distinguished name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   799
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   800
{\f[CB]\-ext\f[R] \f[I]value\f[R]}: X.509 extension
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   801
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   802
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   803
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   804
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   805
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   806
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   807
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   808
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   809
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   810
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   811
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   812
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   813
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   814
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   815
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   816
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   817
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   818
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   819
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   820
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   821
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   822
Use the \f[CB]\-certreq\f[R] command to generate a Certificate Signing
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   823
Request (CSR) using the PKCS #10 format.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   824
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   825
A CSR is intended to be sent to a CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   826
The CA authenticates the certificate requestor (usually offline) and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   827
returns a certificate or certificate chain to replace the existing
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   828
certificate chain (initially a self\-signed certificate) in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   829
keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   830
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   831
The private key associated with \f[I]alias\f[R] is used to create the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   832
PKCS #10 certificate request.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   833
To access the private key, the correct password must be provided.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   834
If \f[CB]\-keypass\f[R] isn\[aq]t provided at the command line and is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   835
different from the password used to protect the integrity of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   836
keystore, then the user is prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   837
If \f[CB]\-dname\f[R] is provided, then it is used as the subject in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   838
CSR.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   839
Otherwise, the X.500 Distinguished Name associated with alias is used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   840
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   841
The \f[CB]\-sigalg\f[R] value specifies the algorithm that should be used
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   842
to sign the CSR.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   843
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   844
The CSR is stored in the \f[CB]\-file\f[R] \f[I]file\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   845
If a file is not specified, then the CSR is output to \f[CB]\-stdout\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   846
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   847
Use the \f[CB]\-importcert\f[R] command to import the response from the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   848
CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   849
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   850
.SH COMMANDS FOR EXPORTING DATA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   851
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   852
.B \f[CB]\-exportcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   853
The following are the available options for the \f[CB]\-exportcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   854
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   855
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   856
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   857
{\f[CB]\-rfc\f[R]}: Output in RFC style
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   858
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   859
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   860
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   861
{\f[CB]\-file\f[R] \f[I]file\f[R]}: Output file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   862
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   863
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   864
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   865
{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   866
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   867
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   868
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   869
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   870
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   871
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   872
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   873
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   874
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   875
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   876
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   877
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   878
\f[I]arg\f[R]] }: Add security provider by fully qualified class name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   879
with an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   880
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   881
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   882
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   883
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   884
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   885
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   886
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   887
Use the \f[CB]\-exportcert\f[R] command to read a certificate from the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   888
keystore that is associated with \f[CB]\-alias\f[R] \f[I]alias\f[R] and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   889
store it in the \f[CB]\-file\f[R] \f[I]file\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   890
When a file is not specified, the certificate is output to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   891
\f[CB]stdout\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   892
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   893
By default, the certificate is output in binary encoding.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   894
If the \f[CB]\-rfc\f[R] option is specified, then the output in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   895
printable encoding format defined by the Internet RFC 1421 Certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   896
Encoding Standard.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   897
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   898
If \f[CB]\-alias\f[R] refers to a trusted certificate, then that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   899
certificate is output.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   900
Otherwise, \f[CB]\-alias\f[R] refers to a key entry with an associated
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   901
certificate chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   902
In that case, the first certificate in the chain is returned.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   903
This certificate authenticates the public key of the entity addressed by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   904
\f[CB]\-alias\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   905
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   906
.SH COMMANDS FOR DISPLAYING DATA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   907
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   908
.B \f[CB]\-list\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   909
The following are the available options for the \f[CB]\-list\f[R] command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   910
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   911
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   912
{\f[CB]\-rfc\f[R]}: Output in RFC style
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   913
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   914
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   915
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   916
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   917
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   918
{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   919
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   920
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   921
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   922
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   923
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   924
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   925
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   926
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   927
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   928
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   929
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   930
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   931
\f[I]arg\f[R]] }: Add security provider by fully qualified class name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   932
with an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   933
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   934
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   935
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   936
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   937
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   938
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   939
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   940
Use the \f[CB]\-list\f[R] command to print the contents of the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   941
entry identified by \f[CB]\-alias\f[R] to \f[CB]stdout\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   942
If \f[CB]\-alias\f[R] \f[I]alias\f[R] is not specified, then the contents
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   943
of the entire keystore are printed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   944
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   945
By default, this command prints the SHA\-256 fingerprint of a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   946
certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   947
If the \f[CB]\-v\f[R] option is specified, then the certificate is printed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   948
in human\-readable format, with additional information such as the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   949
owner, issuer, serial number, and any extensions.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   950
If the \f[CB]\-rfc\f[R] option is specified, then the certificate contents
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   951
are printed by using the printable encoding format, as defined by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   952
Internet RFC 1421 Certificate Encoding Standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   953
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   954
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   955
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   956
You can\[aq]t specify both \f[CB]\-v\f[R] and \f[CB]\-rfc\f[R] in the same
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   957
command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   958
Otherwise, an error is reported.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   959
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   960
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   961
.B \f[CB]\-printcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   962
The following are the available options for the \f[CB]\-printcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   963
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   964
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   965
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   966
{\f[CB]\-rfc\f[R]}: Output in RFC style
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   967
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   968
{\f[CB]\-file\f[R] \f[I]cert_file\f[R]}: Input file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   969
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   970
{\f[CB]\-sslserver\f[R] \f[I]server\f[R][\f[CB]:\f[R]\f[I]port\f[R]]}:: Secure
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   971
Sockets Layer (SSL) server host and port
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   972
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   973
{\f[CB]\-jarfile\f[R] \f[I]JAR_file\f[R]}: Signed \f[CB]\&.jar\f[R] file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   974
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   975
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   976
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   977
Use the \f[CB]\-printcert\f[R] command to read and print the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   978
from \f[CB]\-file\f[R] \f[I]cert_file\f[R], the SSL server located at
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   979
\f[CB]\-sslserver\f[R] \f[I]server\f[R][\f[CB]:\f[R]\f[I]port\f[R]], or the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   980
signed JAR file specified by \f[CB]\-jarfile\f[R] \f[I]JAR_file\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   981
It prints its contents in a human\-readable format.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   982
When a port is not specified, the standard HTTPS port 443 is assumed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   983
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   984
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   985
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   986
The \f[CB]\-sslserver\f[R] and \f[CB]\-file\f[R] options can\[aq]t be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   987
provided in the same command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   988
Otherwise, an error is reported.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   989
If you don\[aq]t specify either option, then the certificate is read
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   990
from \f[CB]stdin\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   991
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   992
When\f[CB]\-rfc\f[R] is specified, the \f[CB]keytool\f[R] command prints the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   993
certificate in PEM mode as defined by the Internet RFC 1421 Certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   994
Encoding standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   995
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   996
If the certificate is read from a file or \f[CB]stdin\f[R], then it might
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   997
be either binary encoded or in printable encoding format, as defined by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   998
the RFC 1421 Certificate Encoding standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   999
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1000
If the SSL server is behind a firewall, then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1001
\f[CB]\-J\-Dhttps.proxyHost=proxyhost\f[R] and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1002
\f[CB]\-J\-Dhttps.proxyPort=proxyport\f[R] options can be specified on the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1003
command line for proxy tunneling.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1004
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1005
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1006
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1007
This option can be used independently of a keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1008
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1009
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1010
.B \f[CB]\-printcertreq\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1011
The following are the available options for the \f[CB]\-printcertreq\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1012
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1013
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1014
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1015
{\f[CB]\-file\f[R] \f[I]file\f[R]}: Input file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1016
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1017
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1018
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1019
Use the \f[CB]\-printcertreq\f[R] command to print the contents of a PKCS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1020
#10 format certificate request, which can be generated by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1021
\f[CB]keytool\ \-certreq\f[R] command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1022
The command reads the request from file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1023
If there is no file, then the request is read from the standard input.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1024
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1025
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1026
.B \f[CB]\-printcrl\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1027
The following are the available options for the \f[CB]\-printcrl\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1028
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1029
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1030
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1031
\f[CB]\-file\ crl\f[R]: Input file name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1032
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1033
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1034
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1035
Use the \f[CB]\-printcrl\f[R] command to read the Certificate Revocation
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1036
List (CRL) from \f[CB]\-file\ crl\f[R] .
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1037
A CRL is a list of the digital certificates that were revoked by the CA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1038
that issued them.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1039
The CA generates the \f[CB]crl\f[R] file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1040
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1041
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1042
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1043
This option can be used independently of a keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1044
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1045
.SH COMMANDS FOR MANAGING THE KEYSTORE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1046
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1047
.B \f[CB]\-storepasswd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1048
The following are the available options for the \f[CB]\-storepasswd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1049
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1050
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1051
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1052
[\f[CB]\-new\f[R] \f[I]arg\f[R]]: New password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1053
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1054
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1055
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1056
{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1057
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1058
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1059
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1060
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1061
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1062
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1063
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1064
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1065
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1066
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1067
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1068
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1069
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1070
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1071
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1072
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1073
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1074
{\f[CB]\-v\f[R]}: Verbose output
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1075
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1076
Use the \f[CB]\-storepasswd\f[R] command to change the password used to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1077
protect the integrity of the keystore contents.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1078
The new password is set by \f[CB]\-new\f[R] \f[I]arg\f[R] and must contain
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1079
at least six characters.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1080
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1081
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1082
.B \f[CB]\-keypasswd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1083
The following are the available options for the \f[CB]\-keypasswd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1084
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1085
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1086
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1087
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1088
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1089
[\f[CB]\-keypass\f[R] \f[I]old_keypass\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1090
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1091
[\f[CB]\-new\f[R] \f[I]new_keypass\f[R]]: New password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1092
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1093
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1094
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1095
{\f[CB]\-storepass\f[R] \f[I]arg\f[R]}: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1096
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1097
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1098
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1099
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1100
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1101
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1102
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1103
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1104
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1105
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1106
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1107
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1108
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1109
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1110
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1111
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1112
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1113
Use the \f[CB]\-keypasswd\f[R] command to change the password (under which
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1114
private/secret keys identified by \f[CB]\-alias\f[R] are protected) from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1115
\f[CB]\-keypass\f[R] \f[I]old_keypass\f[R] to \f[CB]\-new\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1116
\f[I]new_keypass\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1117
The password value must contain at least six characters.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1118
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1119
If the \f[CB]\-keypass\f[R] option isn\[aq]t provided at the command line
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1120
and the \f[CB]\-keypass\f[R] password is different from the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1121
password (\f[CB]\-storepass\f[R] \f[I]arg\f[R]), then the user is prompted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1122
for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1123
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1124
If the \f[CB]\-new\f[R] option isn\[aq]t provided at the command line,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1125
then the user is prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1126
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1127
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1128
.B \f[CB]\-delete\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1129
The following are the available options for the \f[CB]\-delete\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1130
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1131
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1132
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1133
[\f[CB]\-alias\f[R] \f[I]alias\f[R]]: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1134
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1135
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1136
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1137
{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1138
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1139
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1140
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1141
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1142
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1143
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1144
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1145
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1146
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1147
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1148
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1149
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1150
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1151
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1152
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1153
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1154
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1155
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1156
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1157
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1158
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1159
Use the \f[CB]\-delete\f[R] command to delete the \f[CB]\-alias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1160
\f[I]alias\f[R] entry from the keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1161
When not provided at the command line, the user is prompted for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1162
\f[CB]alias\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1163
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1164
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1165
.B \f[CB]\-changealias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1166
The following are the available options for the \f[CB]\-changealias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1167
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1168
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1169
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1170
{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1171
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1172
[\f[CB]\-destalias\f[R] \f[I]alias\f[R]]: Destination alias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1173
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1174
[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1175
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1176
{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1177
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1178
{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1179
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1180
[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1181
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1182
{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1183
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1184
{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1185
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1186
{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1187
\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1188
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1189
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1190
{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1191
\f[I]arg\f[R]]}: Add security provider by fully qualified class name with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1192
an optional configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1193
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1194
{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1195
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1196
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1197
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1198
{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1199
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1200
Use the \f[CB]\-changealias\f[R] command to move an existing keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1201
entry from \f[CB]\-alias\f[R] \f[I]alias\f[R] to a new \f[CB]\-destalias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1202
\f[I]alias\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1203
If a destination alias is not provided, then the command prompts you for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1204
one.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1205
If the original entry is protected with an entry password, then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1206
password can be supplied with the \f[CB]\-keypass\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1207
If a key password is not provided, then the \f[CB]\-storepass\f[R] (if
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1208
provided) is attempted first.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1209
If the attempt fails, then the user is prompted for a password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1210
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1211
.SH COMMANDS FOR DISPLAYING SECURITY\-RELATED INFORMATION
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1212
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1213
.B \f[CB]\-showinfo\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1214
The following are the available options for the \f[CB]\-showinfo\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1215
command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1216
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1217
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1218
{\f[CB]\-tls\f[R]}: Displays TLS configuration information
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1219
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1220
{\f[CB]\-v\f[R]}: Verbose output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1221
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1222
Use the \f[CB]\-showinfo\f[R] command to display various security\-related
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1223
information.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1224
The \f[CB]\-tls\f[R] option displays TLS configurations, such as the list
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1225
of enabled protocols and cipher suites.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1226
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1227
.SH COMMANDS FOR DISPLAYING HELP INFORMATION
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1228
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1229
You can use \f[CB]\-\-help\f[R] to display a list of \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1230
commands or to display help information about a specific
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1231
\f[CB]keytool\f[R] command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1232
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1233
To display a list of \f[CB]keytool\f[R] commands, enter:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1234
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1235
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1236
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1237
\f[CB]keytool\ \-\-help\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1238
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1239
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1240
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1241
To display help information about a specific \f[CB]keytool\f[R] command,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1242
enter:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1243
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1244
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1245
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1246
\f[CB]keytool\ \-<command>\ \-\-help\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1247
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1248
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1249
.SH COMMON COMMAND OPTIONS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1250
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1251
The \f[CB]\-v\f[R] option can appear for all commands except
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1252
\f[CB]\-\-help\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1253
When the \f[CB]\-v\f[R] option appears, it signifies verbose mode, which
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1254
means that more information is provided in the output.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1255
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1256
The \f[CB]\-J\f[R]\f[I]option\f[R] argument can appear for any command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1257
When the \f[CB]\-J\f[R]\f[I]option\f[R] is used, the specified
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1258
\f[I]option\f[R] string is passed directly to the Java interpreter.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1259
This option doesn\[aq]t contain any spaces.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1260
It\[aq]s useful for adjusting the execution environment or memory usage.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1261
For a list of possible interpreter options, enter \f[CB]java\ \-h\f[R] or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1262
\f[CB]java\ \-X\f[R] at the command line.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1263
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1264
These options can appear for all commands operating on a keystore:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1265
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1266
.B \f[CB]\-storetype\f[R] \f[I]storetype\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1267
This qualifier specifies the type of keystore to be instantiated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1268
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1269
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1270
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1271
.B \f[CB]\-keystore\f[R] \f[I]keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1272
The keystore location.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1273
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1274
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1275
If the JKS \f[CB]storetype\f[R] is used and a keystore file doesn\[aq]t
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1276
yet exist, then certain \f[CB]keytool\f[R] commands can result in a new
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1277
keystore file being created.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1278
For example, if \f[CB]keytool\ \-genkeypair\f[R] is called and the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1279
\f[CB]\-keystore\f[R] option isn\[aq]t specified, the default keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1280
file named \f[CB]\&.keystore\f[R] is created in the user\[aq]s home
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1281
directory if it doesn\[aq]t already exist.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1282
Similarly, if the \f[CB]\-keystore\ ks_file\f[R] option is specified but
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1283
\f[CB]ks_file\f[R] doesn\[aq]t exist, then it is created.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1284
For more information on the JKS \f[CB]storetype\f[R], see the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1285
\f[B]KeyStore Implementation\f[R] section in \f[B]KeyStore aliases\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1286
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1287
Note that the input stream from the \f[CB]\-keystore\f[R] option is passed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1288
to the \f[CB]KeyStore.load\f[R] method.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1289
If \f[CB]NONE\f[R] is specified as the URL, then a null stream is passed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1290
to the \f[CB]KeyStore.load\f[R] method.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1291
\f[CB]NONE\f[R] should be specified if the keystore isn\[aq]t file\-based.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1292
For example, when the keystore resides on a hardware token device.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1293
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1294
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1295
.B \f[CB]\-cacerts\f[R] \f[I]cacerts\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1296
Operates on the \f[I]cacerts\f[R] keystore .
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1297
This option is equivalent to \f[CB]\-keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1298
\f[I]path_to_cacerts\f[R] \f[CB]\-storetype\f[R] \f[I]type_of_cacerts\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1299
An error is reported if the \f[CB]\-keystore\f[R] or \f[CB]\-storetype\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1300
option is used with the \f[CB]\-cacerts\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1301
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1302
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1303
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1304
.B \f[CB]\-storepass\f[R] [\f[CB]:env\f[R] | \f[CB]:file\f[R] ] \f[I]argument\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1305
The password that is used to protect the integrity of the keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1306
.RS
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1307
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1308
If the modifier \f[CB]env\f[R] or \f[CB]file\f[R] isn\[aq]t specified, then
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1309
the password has the value \f[I]argument\f[R], which must contain at
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1310
least six characters.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1311
Otherwise, the password is retrieved as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1312
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1313
\f[CB]env\f[R]: Retrieve the password from the environment variable named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1314
\f[I]argument\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1315
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1316
\f[CB]file\f[R]: Retrieve the password from the file named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1317
\f[I]argument\f[R].
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1318
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1319
\f[B]Note:\f[R] All other options that require passwords, such as
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1320
\f[CB]\-keypass\f[R], \f[CB]\-srckeypass\f[R], \f[CB]\-destkeypass\f[R],
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1321
\f[CB]\-srcstorepass\f[R], and \f[CB]\-deststorepass\f[R], accept the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1322
\f[CB]env\f[R] and \f[CB]file\f[R] modifiers.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1323
Remember to separate the password option and the modifier with a colon
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1324
(:).
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1325
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1326
The password must be provided to all commands that access the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1327
contents.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1328
For such commands, when the \f[CB]\-storepass\f[R] option isn\[aq]t
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1329
provided at the command line, the user is prompted for it.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1330
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1331
When retrieving information from the keystore, the password is optional.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1332
If a password is not specified, then the integrity of the retrieved
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1333
information can\[aq]t be verified and a warning is displayed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1334
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1335
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1336
.B \f[CB]\-providername\f[R] \f[I]name\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1337
Used to identify a cryptographic service provider\[aq]s name when listed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1338
in the security properties file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1339
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1340
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1341
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1342
.B \f[CB]\-addprovider\f[R] \f[I]name\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1343
Used to add a security provider by name (such as SunPKCS11) .
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1344
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1345
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1346
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1347
.B \f[CB]\-providerclass\f[R] \f[I]class\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1348
Used to specify the name of a cryptographic service provider\[aq]s
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1349
master class file when the service provider isn\[aq]t listed in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1350
security properties file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1351
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1352
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1353
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1354
.B \f[CB]\-providerpath\f[R] \f[I]list\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1355
Used to specify the provider classpath.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1356
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1357
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1358
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1359
.B \f[CB]\-providerarg\f[R] \f[I]arg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1360
Used with the \f[CB]\-addprovider\f[R] or \f[CB]\-providerclass\f[R] option
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1361
to represent an optional string input argument for the constructor of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1362
\f[I]class\f[R] name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1363
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1364
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1365
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1366
.B \f[CB]\-protected=true\f[R]|\f[CB]false\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1367
Specify this value as \f[CB]true\f[R] when a password must be specified by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1368
way of a protected authentication path, such as a dedicated PIN reader.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1369
Because there are two keystores involved in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1370
\f[CB]\-importkeystore\f[R] command, the following two options,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1371
\f[CB]\-srcprotected\f[R] and \f[CB]\-destprotected\f[R], are provided for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1372
the source keystore and the destination keystore respectively.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1373
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1374
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1375
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1376
.B \f[CB]\-ext\f[R] {\f[I]name\f[R]{\f[CB]:critical\f[R]} {\f[CB]=\f[R]\f[I]value\f[R]}}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1377
Denotes an X.509 certificate extension.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1378
The option can be used in \f[CB]\-genkeypair\f[R] and \f[CB]\-gencert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1379
to embed extensions into the generated certificate, or in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1380
\f[CB]\-certreq\f[R] to show what extensions are requested in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1381
certificate request.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1382
The option can appear multiple times.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1383
The \f[I]name\f[R] argument can be a supported extension name (see
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1384
\f[B]Supported Named Extensions\f[R]) or an arbitrary OID number.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1385
The \f[I]value\f[R] argument, when provided, denotes the argument for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1386
extension.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1387
When \f[I]value\f[R] is omitted, the default value of the extension or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1388
the extension itself requires no argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1389
The \f[CB]:critical\f[R] modifier, when provided, means the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1390
extension\[aq]s \f[CB]isCritical\f[R] attribute is \f[CB]true\f[R];
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1391
otherwise, it is \f[CB]false\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1392
You can use \f[CB]:c\f[R] in place of \f[CB]:critical\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1393
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1394
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1395
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1396
.B \f[CB]\-conf\f[R] \f[I]file\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1397
Specifies a pre\-configured options file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1398
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1399
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1400
.SH PRE\-CONFIGURED OPTIONS FILE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1401
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1402
A pre\-configured options file is a Java properties file that can be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1403
specified with the \f[CB]\-conf\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1404
Each property represents the default option(s) for a keytool command
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1405
using "keytool.\f[I]command_name\f[R]" as the property name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1406
A special property named "keytool.all" represents the default option(s)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1407
applied to all commands.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1408
A property value can include \f[CB]${prop}\f[R] which will be expanded to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1409
the system property associated with it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1410
If an option value includes white spaces inside, it should be surrounded
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1411
by quotation marks (" or \[aq]).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1412
All property names must be in lower case.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1413
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1414
When \f[CB]keytool\f[R] is launched with a pre\-configured options file,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1415
the value for "keytool.all" (if it exists) is prepended to the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1416
\f[CB]keytool\f[R] command line first, with the value for the command name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1417
(if it exists) comes next, and the existing options on the command line
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1418
at last.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1419
For a single\-valued option, this allows the property for a specific
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1420
command to override the "keytool.all" value, and the value specified on
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1421
the command line to override both.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1422
For multiple\-valued options, all of them will be used by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1423
\f[CB]keytool\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1424
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1425
For example, given the following file named \f[CB]preconfig\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1426
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1427
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1428
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1429
\ \ \ \ #\ A\ tiny\ pre\-configured\ options\ file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1430
\ \ \ \ keytool.all\ =\ \-keystore\ ${user.home}/ks
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1431
\ \ \ \ keytool.list\ =\ \-v
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1432
\ \ \ \ keytool.genkeypair\ =\ \-keyalg\ rsa
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1433
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1434
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1435
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1436
\f[CB]keytool\ \-conf\ preconfig\ \-list\f[R] is identical to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1437
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1438
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1439
\f[CB]keytool\ \-keystore\ ~/ks\ \-v\ \-list\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1440
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1441
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1442
\f[CB]keytool\ \-conf\ preconfig\ \-genkeypair\ \-alias\ me\f[R] is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1443
identical to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1444
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1445
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1446
\f[CB]keytool\ \-keystore\ ~/ks\ \-keyalg\ rsa\ \-genkeypair\ \-alias\ me\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1447
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1448
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1449
\f[CB]keytool\ \-conf\ preconfig\ \-genkeypair\ \-alias\ you\ \-keyalg\ ec\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1450
is identical to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1451
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1452
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1453
\f[CB]keytool\ \-keystore\ ~/ks\ \-keyalg\ rsa\ \-genkeypair\ \-alias\ you\ \-keyalg\ ec\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1454
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1455
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1456
which is equivalent to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1457
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1458
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1459
\f[CB]keytool\ \-keystore\ ~/ks\ \-genkeypair\ \-alias\ you\ \-keyalg\ ec\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1460
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1461
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1462
because \f[CB]\-keyalg\f[R] is a single\-valued option and the \f[CB]ec\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1463
value specified on the command line overrides the preconfigured options
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1464
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1465
.SH EXAMPLES OF OPTION VALUES
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1466
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1467
The following examples show the defaults for various option values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1468
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1469
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1470
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1471
\-alias\ "mykey"
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1472
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1473
\-keyalg
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1474
\ \ \ \ "DSA"\ (when\ using\ \-genkeypair)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1475
\ \ \ \ "DES"\ (when\ using\ \-genseckey)
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1476
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1477
\-keysize
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1478
\ \ \ \ 2048\ (when\ using\ \-genkeypair\ and\ \-keyalg\ is\ "RSA")
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1479
\ \ \ \ 2048\ (when\ using\ \-genkeypair\ and\ \-keyalg\ is\ "DSA")
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1480
\ \ \ \ 256\ (when\ using\ \-genkeypair\ and\ \-keyalg\ is\ "EC")
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1481
\ \ \ \ 56\ (when\ using\ \-genseckey\ and\ \-keyalg\ is\ "DES")
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1482
\ \ \ \ 168\ (when\ using\ \-genseckey\ and\ \-keyalg\ is\ "DESede")
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1483
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1484
\-validity\ 90
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1485
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1486
\-keystore\ <the\ file\ named\ .keystore\ in\ the\ user\[aq]s\ home\ directory>
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1487
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1488
\-destkeystore\ <the\ file\ named\ .keystore\ in\ the\ user\[aq]s\ home\ directory>
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1489
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1490
\-storetype\ <the\ value\ of\ the\ "keystore.type"\ property\ in\ the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1491
\ \ \ \ security\ properties\ file,\ which\ is\ returned\ by\ the\ static
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1492
\ \ \ \ getDefaultType\ method\ in\ java.security.KeyStore>
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1493
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1494
\-file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1495
\ \ \ \ stdin\ (if\ reading)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1496
\ \ \ \ stdout\ (if\ writing)
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 21743
diff changeset
  1497
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1498
\-protected\ false
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1499
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1500
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1501
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1502
When generating a certificate or a certificate request, the default
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1503
signature algorithm (\f[CB]\-sigalg\f[R] option) is derived from the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1504
algorithm of the underlying private key to provide an appropriate level
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1505
of security strength as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1506
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1507
.TS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1508
tab(@);
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1509
l l l.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1510
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1511
keyalg
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1512
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1513
keysize
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1514
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1515
default sigalg
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1516
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1517
_
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1518
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1519
DSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1520
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1521
any size
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1522
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1523
SHA256withDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1524
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1525
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1526
RSA \ \ \ 
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1527
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1528
<= 3072
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1529
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1530
SHA256withRSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1531
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1532
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1533
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1534
<= 7680
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1535
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1536
SHA384withRSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1537
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1538
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1539
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1540
> 7680
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1541
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1542
SHA512withRSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1543
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1544
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1545
EC
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1546
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1547
< 384
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1548
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1549
SHA256withECDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1550
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1551
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1552
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1553
< 512
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1554
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1555
SHA384withECDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1556
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1557
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1558
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1559
= 512
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1560
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1561
SHA512withECDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1562
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1563
.TE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1564
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1565
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1566
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1567
To improve out of the box security, default key size and signature
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1568
algorithm names are periodically updated to stronger values with each
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1569
release of the JDK.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1570
If interoperability with older releases of the JDK is important, make
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1571
sure that the defaults are supported by those releases.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1572
Alternatively, you can use the \f[CB]\-keysize\f[R] or \f[CB]\-sigalg\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1573
options to override the default values at your own risk.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1574
.SH SUPPORTED NAMED EXTENSIONS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1575
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1576
The \f[CB]keytool\f[R] command supports these named extensions.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1577
The names aren\[aq]t case\-sensitive.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1578
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1579
.B \f[CB]BC\f[R] or \f[CB]BasicContraints\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1580
Values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1581
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1582
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1583
The full form is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1584
\f[CB]ca:\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]}[\f[CB],pathlen:\f[R]\f[I]len\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1585
or \f[I]len\f[R], which is short for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1586
\f[CB]ca:true,pathlen:\f[R]\f[I]len\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1587
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1588
When \f[I]len\f[R] is omitted, the resulting value is \f[CB]ca:true\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1589
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1590
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1591
.B \f[CB]KU\f[R] or \f[CB]KeyUsage\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1592
Values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1593
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1594
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1595
\f[I]usage\f[R](\f[CB],\f[R] \f[I]usage\f[R])*
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1596
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1597
\f[I]usage\f[R] can be one of the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1598
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1599
\f[CB]digitalSignature\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1600
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1601
\f[CB]nonRepudiation\f[R] (\f[CB]contentCommitment\f[R])
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1602
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1603
\f[CB]keyEncipherment\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1604
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1605
\f[CB]dataEncipherment\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1606
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1607
\f[CB]keyAgreement\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1608
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1609
\f[CB]keyCertSign\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1610
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1611
\f[CB]cRLSign\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1612
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1613
\f[CB]encipherOnly\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1614
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1615
\f[CB]decipherOnly\f[R]
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1616
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1617
Provided there is no ambiguity, the \f[I]usage\f[R] argument can be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1618
abbreviated with the first few letters (such as \f[CB]dig\f[R] for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1619
\f[CB]digitalSignature\f[R]) or in camel\-case style (such as \f[CB]dS\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1620
for \f[CB]digitalSignature\f[R] or \f[CB]cRLS\f[R] for \f[CB]cRLSign\f[R]).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1621
The \f[I]usage\f[R] values are case\-sensitive.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1622
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1623
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1624
.B \f[CB]EKU\f[R] or \f[CB]ExtendedKeyUsage\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1625
Values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1626
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1627
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1628
\f[I]usage\f[R](\f[CB],\f[R] \f[I]usage\f[R])*
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1629
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1630
\f[I]usage\f[R] can be one of the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1631
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1632
\f[CB]anyExtendedKeyUsage\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1633
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1634
\f[CB]serverAuth\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1635
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1636
\f[CB]clientAuth\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1637
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1638
\f[CB]codeSigning\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1639
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1640
\f[CB]emailProtection\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1641
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1642
\f[CB]timeStamping\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1643
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1644
\f[CB]OCSPSigning\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1645
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1646
Any OID string
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1647
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1648
Provided there is no ambiguity, the \f[I]usage\f[R] argument can be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1649
abbreviated with the first few letters or in camel\-case style.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1650
The \f[I]usage\f[R] values are case\-sensitive.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1651
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1652
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1653
.B \f[CB]SAN\f[R] or \f[CB]SubjectAlternativeName\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1654
Values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1655
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1656
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1657
\f[I]type\f[R]\f[CB]:\f[R]\f[I]value\f[R](\f[CB],\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1658
\f[I]type\f[R]\f[CB]:\f[R]\f[I]value\f[R])*
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1659
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1660
\f[I]type\f[R] can be one of the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1661
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1662
\f[CB]EMAIL\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1663
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1664
\f[CB]URI\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1665
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1666
\f[CB]DNS\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1667
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1668
\f[CB]IP\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1669
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1670
\f[CB]OID\f[R]
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1671
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1672
The \f[I]value\f[R] argument is the string format value for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1673
\f[I]type\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1674
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1675
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1676
.B \f[CB]IAN\f[R] or \f[CB]IssuerAlternativeName\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1677
Values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1678
.RS
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1679
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1680
Same as \f[CB]SAN\f[R] or \f[CB]SubjectAlternativeName\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1681
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1682
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1683
.B \f[CB]SIA\f[R] or \f[CB]SubjectInfoAccess\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1684
Values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1685
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1686
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1687
\f[I]method\f[R]\f[CB]:\f[R]\f[I]location\-type\f[R]\f[CB]:\f[R]\f[I]location\-value\f[R](\f[CB],\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1688
\f[I]method\f[R]\f[CB]:\f[R]\f[I]location\-type\f[R]\f[CB]:\f[R]\f[I]location\-value\f[R])*
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1689
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1690
\f[I]method\f[R] can be one of the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1691
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1692
\f[CB]timeStamping\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1693
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1694
\f[CB]caRepository\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1695
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1696
Any OID
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1697
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1698
The \f[I]location\-type\f[R] and \f[I]location\-value\f[R] arguments can
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1699
be any \f[I]type\f[R]\f[CB]:\f[R]\f[I]value\f[R] supported by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1700
\f[CB]SubjectAlternativeName\f[R] extension.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1701
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1702
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1703
.B \f[CB]AIA\f[R] or \f[CB]AuthorityInfoAccess\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1704
Values:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1705
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1706
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1707
Same as \f[CB]SIA\f[R] or \f[CB]SubjectInfoAccess\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1708
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1709
The \f[I]method\f[R] argument can be one of the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1710
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1711
\f[CB]ocsp\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1712
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1713
\f[CB]caIssuers\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1714
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1715
Any OID
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1716
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1717
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1718
When \f[I]name\f[R] is OID, the value is the hexadecimal dumped Definite
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1719
Encoding Rules (DER) encoding of the \f[CB]extnValue\f[R] for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1720
extension excluding the OCTET STRING type and length bytes.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1721
Other than standard hexadecimal numbers (0\-9, a\-f, A\-F), any extra
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1722
characters are ignored in the HEX string.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1723
Therefore, both 01:02:03:04 and 01020304 are accepted as identical
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1724
values.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1725
When there is no value, the extension has an empty value field.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1726
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1727
A special name \f[CB]honored\f[R], used only in \f[CB]\-gencert\f[R],
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1728
denotes how the extensions included in the certificate request should be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1729
honored.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1730
The value for this name is a comma\-separated list of \f[CB]all\f[R] (all
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1731
requested extensions are honored),
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1732
\f[I]name\f[R]{\f[CB]:\f[R][\f[CB]critical\f[R]|\f[CB]non\-critical\f[R]]} (the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1733
named extension is honored, but it uses a different \f[CB]isCritical\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1734
attribute), and \f[CB]\-name\f[R] (used with \f[CB]all\f[R], denotes an
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1735
exception).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1736
Requested extensions aren\[aq]t honored by default.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1737
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1738
If, besides the\f[CB]\-ext\ honored\f[R] option, another named or OID
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1739
\f[CB]\-ext\f[R] option is provided, this extension is added to those
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1740
already honored.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1741
However, if this name (or OID) also appears in the honored value, then
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1742
its value and criticality override that in the request.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1743
If an extension of the same type is provided multiple times through
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1744
either a name or an OID, only the last extension is used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1745
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1746
The \f[CB]subjectKeyIdentifier\f[R] extension is always created.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1747
For non\-self\-signed certificates, the \f[CB]authorityKeyIdentifier\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1748
is created.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1749
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1750
\f[B]CAUTION:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1751
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1752
Users should be aware that some combinations of extensions (and other
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1753
certificate fields) may not conform to the Internet standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1754
See \f[B]Certificate Conformance Warning\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1755
.SH EXAMPLES OF TASKS IN CREATING A KEYSTORE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1756
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1757
The following examples describe the sequence actions in creating a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1758
keystore for managing public/private key pairs and certificates from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1759
trusted entities.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1760
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1761
\f[B]Generating the Key Pair\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1762
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1763
\f[B]Requesting a Signed Certificate from a CA\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1764
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1765
\f[B]Importing a Certificate for the CA\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1766
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1767
\f[B]Importing the Certificate Reply from the CA\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1768
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1769
\f[B]Exporting a Certificate That Authenticates the Public Key\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1770
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1771
\f[B]Importing the Keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1772
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1773
\f[B]Generating Certificates for an SSL Server\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1774
.SH GENERATING THE KEY PAIR
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1775
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1776
Create a keystore and then generate the key pair.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1777
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1778
You can enter the command as a single line such as the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1779
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1780
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1781
\f[CB]keytool\ \-genkeypair\ \-dname\ "cn=myname,\ ou=mygroup,\ o=mycompany,\ c=mycountry"\ \-alias\ business\ \-keypass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1782
\f[I]password\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1783
\f[CB]\-keystore\ /working/mykeystore\ \-storepass\ password\ \-validity\ 180\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1784
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1785
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1786
The command creates the keystore named \f[CB]mykeystore\f[R] in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1787
working directory (provided it doesn\[aq]t already exist), and assigns
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1788
it the password specified by \f[CB]\-keypass\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1789
It generates a public/private key pair for the entity whose
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1790
distinguished name is \f[CB]myname\f[R], \f[CB]mygroup\f[R],
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1791
\f[CB]mycompany\f[R], and a two\-letter country code of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1792
\f[CB]mycountry\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1793
It uses the default DSA key generation algorithm to create the keys;
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1794
both are 2048 bits
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1795
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1796
The command uses the default SHA256withDSA signature algorithm to create
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1797
a self\-signed certificate that includes the public key and the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1798
distinguished name information.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1799
The certificate is valid for 180 days, and is associated with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1800
private key in a keystore entry referred to by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1801
\f[CB]\-alias\ business\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1802
The private key is assigned the password specified by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1803
\f[CB]\-keypass\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1804
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1805
The command is significantly shorter when the option defaults are
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1806
accepted.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1807
In this case, no options are required, and the defaults are used for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1808
unspecified options that have default values.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1809
You are prompted for any required values.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1810
You could have the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1811
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1812
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1813
\f[CB]keytool\ \-genkeypair\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1814
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1815
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1816
In this case, a keystore entry with the alias \f[CB]mykey\f[R] is created,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1817
with a newly generated key pair and a certificate that is valid for 90
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1818
days.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1819
This entry is placed in your home directory in a keystore named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1820
\f[CB]\&.keystore\f[R] .
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1821
\f[CB]\&.keystore\f[R] is created if it doesn\[aq]t already exist.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1822
You are prompted for the distinguished name information, the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1823
password, and the private key password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1824
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1825
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1826
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1827
The rest of the examples assume that you executed the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1828
\f[CB]\-genkeypair\f[R] command without specifying options, and that you
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1829
responded to the prompts with values equal to those specified in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1830
first \f[CB]\-genkeypair\f[R] command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1831
For example, a distinguished name of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1832
\f[CB]cn=\f[R]\f[I]myname\f[R]\f[CB],\ ou=\f[R]\f[I]mygroup\f[R]\f[CB],\ o=\f[R]\f[I]mycompany\f[R]\f[CB],\ c=\f[R]\f[I]mycountry\f[R]).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1833
.SH REQUESTING A SIGNED CERTIFICATE FROM A CA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1834
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1835
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1836
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1837
Generating the key pair created a self\-signed certificate; however, a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1838
certificate is more likely to be trusted by others when it is signed by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1839
a CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1840
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1841
To get a CA signature, complete the following process:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1842
.IP "1." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1843
Generate a CSR:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1844
.RS 4
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1845
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1846
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1847
\f[CB]keytool\ \-certreq\ \-file\ myname.csr\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1848
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1849
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1850
This creates a CSR for the entity identified by the default alias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1851
\f[CB]mykey\f[R] and puts the request in the file named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1852
\f[CB]myname.csr\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1853
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1854
.IP "2." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1855
Submit \f[CB]myname.csr\f[R] to a CA, such as DigiCert.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1856
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1857
The CA authenticates you, the requestor (usually offline), and returns a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1858
certificate, signed by them, authenticating your public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1859
In some cases, the CA returns a chain of certificates, each one
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1860
authenticating the public key of the signer of the previous certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1861
in the chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1862
.SH IMPORTING A CERTIFICATE FOR THE CA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1863
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1864
To import a certificate for the CA, complete the following process:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1865
.IP "1." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1866
Before you import the certificate reply from a CA, you need one or more
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1867
trusted certificates either in your keystore or in the \f[CB]cacerts\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1868
keystore file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1869
See \f[CB]\-importcert\f[R] in \f[B]Commands\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1870
.RS 4
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1871
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1872
If the certificate reply is a certificate chain, then you need the top
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1873
certificate of the chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1874
The root CA certificate that authenticates the public key of the CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1875
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1876
If the certificate reply is a single certificate, then you need a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1877
certificate for the issuing CA (the one that signed it).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1878
If that certificate isn\[aq]t self\-signed, then you need a certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1879
for its signer, and so on, up to a self\-signed root CA certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1880
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1881
The \f[CB]cacerts\f[R] keystore ships with a set of root certificates
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1882
issued by the CAs of \f[B]the Oracle Java Root Certificate program\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1883
[http://www.oracle.com/technetwork/java/javase/javasecarootcertsprogram\-1876540.html].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1884
If you request a signed certificate from a CA, and a certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1885
authenticating that CA\[aq]s public key hasn\[aq]t been added to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1886
\f[CB]cacerts\f[R], then you must import a certificate from that CA as a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1887
trusted certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1888
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1889
A certificate from a CA is usually self\-signed or signed by another CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1890
If it is signed by another CA, you need a certificate that authenticates
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1891
that CA\[aq]s public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1892
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1893
For example, you have obtained a \f[I]X\f[R]\f[CB]\&.cer\f[R] file from a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1894
company that is a CA and the file is supposed to be a self\-signed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1895
certificate that authenticates that CA\[aq]s public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1896
Before you import it as a trusted certificate, you should ensure that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1897
the certificate is valid by:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1898
.IP "1." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1899
Viewing it with the \f[CB]keytool\ \-printcert\f[R] command or the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1900
\f[CB]keytool\ \-importcert\f[R] command without using the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1901
\f[CB]\-noprompt\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1902
Make sure that the displayed certificate fingerprints match the expected
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1903
fingerprints.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1904
.IP "2." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1905
Calling the person who sent the certificate, and comparing the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1906
fingerprints that you see with the ones that they show or that a secure
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1907
public key repository shows.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1908
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1909
Only when the fingerprints are equal is it assured that the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1910
wasn\[aq]t replaced in transit with somebody else\[aq]s certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1911
(such as an attacker\[aq]s certificate).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1912
If such an attack takes place, and you didn\[aq]t check the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1913
before you imported it, then you would be trusting anything that the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1914
attacker signed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1915
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1916
.IP "2." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1917
Replace the self\-signed certificate with a certificate chain, where
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1918
each certificate in the chain authenticates the public key of the signer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1919
of the previous certificate in the chain, up to a root CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1920
.RS 4
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1921
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1922
If you trust that the certificate is valid, then you can add it to your
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1923
keystore by entering the following command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1924
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1925
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1926
\f[CB]keytool\ \-importcert\ \-alias\f[R] \f[I]alias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1927
\f[CB]\-file\ *X*\f[R].cer`
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1928
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1929
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1930
This command creates a trusted certificate entry in the keystore from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1931
the data in the CA certificate file and assigns the values of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1932
\f[I]alias\f[R] to the entry.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1933
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1934
.SH IMPORTING THE CERTIFICATE REPLY FROM THE CA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1935
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1936
After you import a certificate that authenticates the public key of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1937
CA that you submitted your certificate signing request to (or there is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1938
already such a certificate in the \f[CB]cacerts\f[R] file), you can import
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1939
the certificate reply and replace your self\-signed certificate with a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1940
certificate chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1941
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1942
The certificate chain is one of the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1943
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1944
Returned by the CA when the CA reply is a chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1945
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1946
Constructed when the CA reply is a single certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1947
This certificate chain is constructed by using the certificate reply and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1948
trusted certificates available either in the keystore where you import
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1949
the reply or in the \f[CB]cacerts\f[R] keystore file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1950
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1951
For example, if you sent your certificate signing request to DigiCert,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1952
then you can import their reply by entering the following command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1953
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1954
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1955
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1956
In this example, the returned certificate is named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1957
\f[CB]DCmyname.cer\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1958
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1959
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1960
\f[CB]keytool\ \-importcert\ \-trustcacerts\ \-file\ DCmyname.cer\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1961
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1962
.SH EXPORTING A CERTIFICATE THAT AUTHENTICATES THE PUBLIC KEY
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1963
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1964
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1965
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1966
If you used the \f[CB]jarsigner\f[R] command to sign a Java Archive (JAR)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1967
file, then clients that use the file will want to authenticate your
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1968
signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1969
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1970
One way that clients can authenticate you is by importing your public
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1971
key certificate into their keystore as a trusted entry.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1972
You can then export the certificate and supply it to your clients.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1973
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1974
For example:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1975
.IP "1." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1976
Copy your certificate to a file named \f[CB]myname.cer\f[R] by entering
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1977
the following command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1978
.RS 4
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1979
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1980
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1981
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1982
In this example, the entry has an alias of \f[CB]mykey\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1983
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1984
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1985
\f[CB]keytool\ \-exportcert\ \-alias\ mykey\ \-file\ myname.cer\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1986
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1987
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1988
.IP "2." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1989
With the certificate and the signed JAR file, a client can use the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1990
\f[CB]jarsigner\f[R] command to authenticate your signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1991
.SH IMPORTING THE KEYSTORE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1992
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1993
Use the \f[CB]importkeystore\f[R] command to import an entire keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1994
into another keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1995
This imports all entries from the source keystore, including keys and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1996
certificates, to the destination keystore with a single command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1997
You can use this command to import entries from a different type of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1998
keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1999
During the import, all new entries in the destination keystore will have
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2000
the same alias names and protection passwords (for secret keys and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2001
private keys).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2002
If the \f[CB]keytool\f[R] command can\[aq]t recover the private keys or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2003
secret keys from the source keystore, then it prompts you for a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2004
password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2005
If it detects alias duplication, then it asks you for a new alias, and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2006
you can specify a new alias or simply allow the \f[CB]keytool\f[R] command
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2007
to overwrite the existing one.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2008
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2009
For example, import entries from a typical JKS type keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2010
\f[CB]key.jks\f[R] into a PKCS #11 type hardware\-based keystore, by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2011
entering the following command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2012
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2013
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2014
\f[CB]keytool\ \-importkeystore\ \-srckeystore\ key.jks\ \-destkeystore\ NONE\ \-srcstoretype\ JKS\ \-deststoretype\ PKCS11\ \-srcstorepass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2015
\f[I]password\f[R] \f[CB]\-deststorepass\f[R] \f[I]password\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2016
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2017
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2018
The \f[CB]importkeystore\f[R] command can also be used to import a single
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2019
entry from a source keystore to a destination keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2020
In this case, besides the options you used in the previous example, you
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2021
need to specify the alias you want to import.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2022
With the \f[CB]\-srcalias\f[R] option specified, you can also specify the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2023
destination alias name, protection password for a secret or private key,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2024
and the destination protection password you want as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2025
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2026
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2027
\f[CB]keytool\ \-importkeystore\ \-srckeystore\ key.jks\ \-destkeystore\ NONE\ \-srcstoretype\ JKS\ \-deststoretype\ PKCS11\ \-srcstorepass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2028
\f[I]password\f[R] \f[CB]\-deststorepass\f[R] \f[I]password\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2029
\f[CB]\-srcalias\ myprivatekey\ \-destalias\ myoldprivatekey\ \-srckeypass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2030
\f[I]password\f[R] \f[CB]\-destkeypass\f[R] \f[I]password\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2031
\f[CB]\-noprompt\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2032
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2033
.SH GENERATING CERTIFICATES FOR AN SSL SERVER
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2034
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2035
The following are \f[CB]keytool\f[R] commands used to generate key pairs
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2036
and certificates for three entities:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2037
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2038
Root CA (\f[CB]root\f[R])
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2039
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2040
Intermediate CA (\f[CB]ca\f[R])
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2041
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2042
SSL server (\f[CB]server\f[R])
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2043
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2044
Ensure that you store all the certificates in the same keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2045
In the following examples, RSA is the recommended the key algorithm.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2046
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2047
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2048
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2049
keytool\ \-genkeypair\ \-keystore\ root.jks\ \-alias\ root\ \-ext\ bc:c
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2050
keytool\ \-genkeypair\ \-keystore\ ca.jks\ \-alias\ ca\ \-ext\ bc:c
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2051
keytool\ \-genkeypair\ \-keystore\ server.jks\ \-alias\ server
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
  2052
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2053
keytool\ \-keystore\ root.jks\ \-alias\ root\ \-exportcert\ \-rfc\ >\ root.pem
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
  2054
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2055
keytool\ \-storepass\ password\ \-keystore\ ca.jks\ \-certreq\ \-alias\ ca\ |
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2056
\ \ \ \ keytool\ \-storepass\ password\ \-keystore\ root.jks
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2057
\ \ \ \ \-gencert\ \-alias\ root\ \-ext\ BC=0\ \-rfc\ >\ ca.pem
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2058
keytool\ \-keystore\ ca.jks\ \-importcert\ \-alias\ ca\ \-file\ ca.pem
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
  2059
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2060
keytool\ \-storepass\ password\ \-keystore\ server.jks\ \-certreq\ \-alias\ server\ |
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2061
\ \ \ \ keytool\ \-storepass\ password\ \-keystore\ ca.jks\ \-gencert\ \-alias\ ca
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2062
\ \ \ \ \-ext\ ku:c=dig,kE\ \-rfc\ >\ server.pem
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2063
cat\ root.pem\ ca.pem\ server.pem\ |
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2064
\ \ \ \ keytool\ \-keystore\ server.jks\ \-importcert\ \-alias\ server
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2065
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2066
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2067
.SH TERMS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2068
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2069
.B Keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2070
A keystore is a storage facility for cryptographic keys and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2071
certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2072
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2073
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2074
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2075
.B Keystore entries
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2076
Keystores can have different types of entries.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2077
The two most applicable entry types for the \f[CB]keytool\f[R] command
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2078
include the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2079
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2080
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2081
Key entries: Each entry holds very sensitive cryptographic key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2082
information, which is stored in a protected format to prevent
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2083
unauthorized access.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2084
Typically, a key stored in this type of entry is a secret key, or a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2085
private key accompanied by the certificate chain for the corresponding
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2086
public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2087
See \f[B]Certificate Chains\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2088
The \f[CB]keytool\f[R] command can handle both types of entries, while the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2089
\f[CB]jarsigner\f[R] tool only handles the latter type of entry, that is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2090
private keys and their associated certificate chains.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2091
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2092
Trusted certificate entries: Each entry contains a single public key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2093
certificate that belongs to another party.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2094
The entry is called a trusted certificate because the keystore owner
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2095
trusts that the public key in the certificate belongs to the identity
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2096
identified by the subject (owner) of the certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2097
The issuer of the certificate vouches for this, by signing the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2098
certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2099
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2100
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2101
.B Keystore aliases
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2102
All keystore entries (key and trusted certificate entries) are accessed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2103
by way of unique aliases.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2104
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2105
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2106
An alias is specified when you add an entity to the keystore with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2107
\f[CB]\-genseckey\f[R] command to generate a secret key, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2108
\f[CB]\-genkeypair\f[R] command to generate a key pair (public and private
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2109
key), or the \f[CB]\-importcert\f[R] command to add a certificate or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2110
certificate chain to the list of trusted certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2111
Subsequent \f[CB]keytool\f[R] commands must use this same alias to refer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2112
to the entity.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2113
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2114
For example, you can use the alias \f[CB]duke\f[R] to generate a new
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2115
public/private key pair and wrap the public key into a self\-signed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2116
certificate with the following command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2117
See \f[B]Certificate Chains\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2118
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2119
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2120
\f[CB]keytool\ \-genkeypair\ \-alias\ duke\ \-keypass\f[R] \f[I]passwd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2121
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2122
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2123
This example specifies an initial \f[I]passwd\f[R] required by subsequent
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2124
commands to access the private key associated with the alias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2125
\f[CB]duke\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2126
If you later want to change Duke\[aq]s private key password, use a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2127
command such as the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2128
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2129
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2130
\f[CB]keytool\ \-keypasswd\ \-alias\ duke\ \-keypass\f[R] \f[I]passwd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2131
\f[CB]\-new\f[R] \f[I]newpasswd\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2132
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2133
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2134
This changes the initial \f[I]passwd\f[R] to \f[I]newpasswd\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2135
A password shouldn\[aq]t be specified on a command line or in a script
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2136
unless it is for testing purposes, or you are on a secure system.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2137
If you don\[aq]t specify a required password option on a command line,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2138
then you are prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2139
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2140
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2141
.B Keystore implementation
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2142
The \f[CB]KeyStore\f[R] class provided in the \f[CB]java.security\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2143
package supplies well\-defined interfaces to access and modify the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2144
information in a keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2145
It is possible for there to be multiple different concrete
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2146
implementations, where each implementation is that for a particular type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2147
of keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2148
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2149
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2150
Currently, two command\-line tools (\f[CB]keytool\f[R] and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2151
\f[CB]jarsigner\f[R]) make use of keystore implementations.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2152
Because the \f[CB]KeyStore\f[R] class is \f[CB]public\f[R], users can write
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2153
additional security applications that use it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2154
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2155
In JDK 9 and later, the default keystore implementation is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2156
\f[CB]PKCS12\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2157
This is a cross platform keystore based on the RSA PKCS12 Personal
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2158
Information Exchange Syntax Standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2159
This standard is primarily meant for storing or transporting a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2160
user\[aq]s private keys, certificates, and miscellaneous secrets.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2161
There is another built\-in implementation, provided by Oracle.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2162
It implements the keystore as a file with a proprietary keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2163
(format) named \f[CB]JKS\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2164
It protects each private key with its individual password, and also
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2165
protects the integrity of the entire keystore with a (possibly
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2166
different) password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2167
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2168
Keystore implementations are provider\-based.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2169
More specifically, the application interfaces supplied by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2170
\f[CB]KeyStore\f[R] are implemented in terms of a Service Provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2171
Interface (SPI).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2172
That is, there is a corresponding abstract \f[CB]KeystoreSpi\f[R] class,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2173
also in the \f[CB]java.security\ package\f[R], which defines the Service
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2174
Provider Interface methods that providers must implement.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2175
The term \f[I]provider\f[R] refers to a package or a set of packages that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2176
supply a concrete implementation of a subset of services that can be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2177
accessed by the Java Security API.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2178
To provide a keystore implementation, clients must implement a provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2179
and supply a \f[CB]KeystoreSpi\f[R] subclass implementation, as described
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2180
in Steps to Implement and Integrate a Provider.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2181
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2182
Applications can choose different types of keystore implementations from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2183
different providers, using the \f[CB]getInstance\f[R] factory method
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2184
supplied in the \f[CB]KeyStore\f[R] class.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2185
A keystore type defines the storage and data format of the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2186
information, and the algorithms used to protect private/secret keys in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2187
the keystore and the integrity of the keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2188
Keystore implementations of different types aren\[aq]t compatible.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2189
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2190
The \f[CB]keytool\f[R] command works on any file\-based keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2191
implementation.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2192
It treats the keystore location that is passed to it at the command line
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2193
as a file name and converts it to a \f[CB]FileInputStream\f[R], from which
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2194
it loads the keystore information.)The \f[CB]jarsigner\f[R] commands can
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2195
read a keystore from any location that can be specified with a URL.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2196
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2197
For \f[CB]keytool\f[R] and \f[CB]jarsigner\f[R], you can specify a keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2198
type at the command line, with the \f[CB]\-storetype\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2199
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2200
If you don\[aq]t explicitly specify a keystore type, then the tools
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2201
choose a keystore implementation based on the value of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2202
\f[CB]keystore.type\f[R] property specified in the security properties
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2203
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2204
The security properties file is called \f[CB]java.security\f[R], and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2205
resides in the security properties directory:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2206
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2207
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2208
\f[CB]java.home/lib/security\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2209
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2210
\f[B]Windows:\f[R] \f[CB]java.home\\lib\\security\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2211
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2212
Each tool gets the \f[CB]keystore.type\f[R] value and then examines all
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2213
the currently installed providers until it finds one that implements a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2214
keystores of that type.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2215
It then uses the keystore implementation from that provider.The
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2216
\f[CB]KeyStore\f[R] class defines a static method named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2217
\f[CB]getDefaultType\f[R] that lets applications retrieve the value of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2218
\f[CB]keystore.type\f[R] property.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2219
The following line of code creates an instance of the default keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2220
type as specified in the \f[CB]keystore.type\f[R] property:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2221
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2222
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2223
\f[CB]KeyStore\ keyStore\ =\ KeyStore.getInstance(KeyStore.getDefaultType());\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2224
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2225
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2226
The default keystore type is \f[CB]pkcs12\f[R], which is a cross\-platform
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2227
keystore based on the RSA PKCS12 Personal Information Exchange Syntax
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2228
Standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2229
This is specified by the following line in the security properties file:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2230
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2231
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2232
\f[CB]keystore.type=pkcs12\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2233
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2234
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2235
To have the tools utilize a keystore implementation other than the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2236
default, you can change that line to specify a different keystore type.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2237
For example, if you want to use the Oracle\[aq]s \f[CB]jks\f[R] keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2238
implementation, then change the line to the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2239
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2240
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2241
\f[CB]keystore.type=jks\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2242
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2243
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2244
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2245
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2246
Case doesn\[aq]t matter in keystore type designations.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2247
For example, \f[CB]JKS\f[R] would be considered the same as \f[CB]jks\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2248
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2249
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2250
.B Certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2251
A certificate (or public\-key certificate) is a digitally signed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2252
statement from one entity (the issuer), saying that the public key and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2253
some other information of another entity (the subject) has some specific
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2254
value.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2255
The following terms are related to certificates:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2256
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2257
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2258
Public Keys: These are numbers associated with a particular entity, and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2259
are intended to be known to everyone who needs to have trusted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2260
interactions with that entity.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2261
Public keys are used to verify signatures.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2262
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2263
Digitally Signed: If some data is digitally signed, then it is stored
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2264
with the identity of an entity and a signature that proves that entity
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2265
knows about the data.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2266
The data is rendered unforgeable by signing with the entity\[aq]s
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2267
private key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2268
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2269
Identity: A known way of addressing an entity.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2270
In some systems, the identity is the public key, and in others it can be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2271
anything from an Oracle Solaris UID to an email address to an X.509
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2272
distinguished name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2273
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2274
Signature: A signature is computed over some data using the private key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2275
of an entity.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2276
The signer, which in the case of a certificate is also known as the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2277
issuer.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2278
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2279
Private Keys: These are numbers, each of which is supposed to be known
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2280
only to the particular entity whose private key it is (that is, it is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2281
supposed to be kept secret).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2282
Private and public keys exist in pairs in all public key cryptography
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2283
systems (also referred to as public key crypto systems).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2284
In a typical public key crypto system, such as DSA, a private key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2285
corresponds to exactly one public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2286
Private keys are used to compute signatures.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2287
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2288
Entity: An entity is a person, organization, program, computer,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2289
business, bank, or something else you are trusting to some degree.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2290
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2291
Public key cryptography requires access to users\[aq] public keys.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2292
In a large\-scale networked environment, it is impossible to guarantee
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2293
that prior relationships between communicating entities were established
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2294
or that a trusted repository exists with all used public keys.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2295
Certificates were invented as a solution to this public key distribution
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2296
problem.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2297
Now a Certification Authority (CA) can act as a trusted third party.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2298
CAs are entities such as businesses that are trusted to sign (issue)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2299
certificates for other entities.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2300
It is assumed that CAs only create valid and reliable certificates
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2301
because they are bound by legal agreements.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2302
There are many public Certification Authorities, such as DigiCert,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2303
Comodo, Entrust, and so on.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2304
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2305
You can also run your own Certification Authority using products such as
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2306
Microsoft Certificate Server or the Entrust CA product for your
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2307
organization.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2308
With the \f[CB]keytool\f[R] command, it is possible to display, import,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2309
and export certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2310
It is also possible to generate self\-signed certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2311
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2312
The \f[CB]keytool\f[R] command currently handles X.509 certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2313
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2314
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2315
.B X.509 Certificates
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2316
The X.509 standard defines what information can go into a certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2317
and describes how to write it down (the data format).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2318
All the data in a certificate is encoded with two related standards
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2319
called ASN.1/DER.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2320
Abstract Syntax Notation 1 describes data.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2321
The Definite Encoding Rules describe a single way to store and transfer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2322
that data.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2323
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2324
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2325
All X.509 certificates have the following data, in addition to the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2326
signature:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2327
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2328
Version: This identifies which version of the X.509 standard applies to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2329
this certificate, which affects what information can be specified in it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2330
Thus far, three versions are defined.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2331
The \f[CB]keytool\f[R] command can import and export v1, v2, and v3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2332
certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2333
It generates v3 certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2334
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2335
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2336
X.509 Version 1 has been available since 1988, is widely deployed, and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2337
is the most generic.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2338
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2339
X.509 Version 2 introduced the concept of subject and issuer unique
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2340
identifiers to handle the possibility of reuse of subject or issuer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2341
names over time.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2342
Most certificate profile documents strongly recommend that names not be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2343
reused and that certificates shouldn\[aq]t make use of unique
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2344
identifiers.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2345
Version 2 certificates aren\[aq]t widely used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2346
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2347
X.509 Version 3 is the most recent (1996) and supports the notion of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2348
extensions where anyone can define an extension and include it in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2349
certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2350
Some common extensions are: KeyUsage (limits the use of the keys to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2351
particular purposes such as \f[CB]signing\-only\f[R]) and AlternativeNames
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2352
(allows other identities to also be associated with this public key, for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2353
example.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2354
DNS names, email addresses, IP addresses).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2355
Extensions can be marked critical to indicate that the extension should
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2356
be checked and enforced or used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2357
For example, if a certificate has the KeyUsage extension marked critical
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2358
and set to \f[CB]keyCertSign\f[R], then when this certificate is presented
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2359
during SSL communication, it should be rejected because the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2360
extension indicates that the associated private key should only be used
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2361
for signing certificates and not for SSL use.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2362
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2363
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2364
Serial number: The entity that created the certificate is responsible
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2365
for assigning it a serial number to distinguish it from other
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2366
certificates it issues.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2367
This information is used in numerous ways.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2368
For example, when a certificate is revoked its serial number is placed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2369
in a Certificate Revocation List (CRL).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2370
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2371
Signature algorithm identifier: This identifies the algorithm used by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2372
the CA to sign the certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2373
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2374
Issuer name: The X.500 Distinguished Name of the entity that signed the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2375
certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2376
This is typically a CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2377
Using this certificate implies trusting the entity that signed this
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2378
certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2379
In some cases, such as root or top\-level CA certificates, the issuer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2380
signs its own certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2381
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2382
Validity period: Each certificate is valid only for a limited amount of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2383
time.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2384
This period is described by a start date and time and an end date and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2385
time, and can be as short as a few seconds or almost as long as a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2386
century.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2387
The validity period chosen depends on a number of factors, such as the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2388
strength of the private key used to sign the certificate, or the amount
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2389
one is willing to pay for a certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2390
This is the expected period that entities can rely on the public value,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2391
when the associated private key has not been compromised.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2392
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2393
Subject name: The name of the entity whose public key the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2394
identifies.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2395
This name uses the X.500 standard, so it is intended to be unique across
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2396
the Internet.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2397
This is the X.500 Distinguished Name (DN) of the entity.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2398
For example,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2399
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2400
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2401
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2402
\f[CB]CN=Java\ Duke,\ OU=Java\ Software\ Division,\ O=Oracle\ Corporation,\ C=US\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2403
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2404
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2405
These refer to the subject\[aq]s common name (CN), organizational unit
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2406
(OU), organization (O), and country (C).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2407
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2408
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2409
Subject public key information: This is the public key of the entity
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2410
being named with an algorithm identifier that specifies which public key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2411
crypto system this key belongs to and any associated key parameters.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2412
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2413
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2414
.B Certificate Chains
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2415
The \f[CB]keytool\f[R] command can create and manage keystore key entries
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2416
that each contain a private key and an associated certificate chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2417
The first certificate in the chain contains the public key that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2418
corresponds to the private key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2419
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2420
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2421
When keys are first generated, the chain starts off containing a single
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2422
element, a self\-signed certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2423
See \-genkeypair in \f[B]Commands\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2424
A self\-signed certificate is one for which the issuer (signer) is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2425
same as the subject.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2426
The subject is the entity whose public key is being authenticated by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2427
certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2428
Whenever the \f[CB]\-genkeypair\f[R] command is called to generate a new
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2429
public/private key pair, it also wraps the public key into a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2430
self\-signed certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2431
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2432
Later, after a Certificate Signing Request (CSR) was generated with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2433
\f[CB]\-certreq\f[R] command and sent to a Certification Authority (CA),
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2434
the response from the CA is imported with \f[CB]\-importcert\f[R], and the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2435
self\-signed certificate is replaced by a chain of certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2436
At the bottom of the chain is the certificate (reply) issued by the CA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2437
authenticating the subject\[aq]s public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2438
The next certificate in the chain is one that authenticates the CA\[aq]s
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2439
public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2440
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2441
In many cases, this is a self\-signed certificate, which is a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2442
certificate from the CA authenticating its own public key, and the last
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2443
certificate in the chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2444
In other cases, the CA might return a chain of certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2445
In this case, the bottom certificate in the chain is the same (a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2446
certificate signed by the CA, authenticating the public key of the key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2447
entry), but the second certificate in the chain is a certificate signed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2448
by a different CA that authenticates the public key of the CA you sent
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2449
the CSR to.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2450
The next certificate in the chain is a certificate that authenticates
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2451
the second CA\[aq]s key, and so on, until a self\-signed root
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2452
certificate is reached.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2453
Each certificate in the chain (after the first) authenticates the public
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2454
key of the signer of the previous certificate in the chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2455
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2456
Many CAs only return the issued certificate, with no supporting chain,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2457
especially when there is a flat hierarchy (no intermediates CAs).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2458
In this case, the certificate chain must be established from trusted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2459
certificate information already stored in the keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2460
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2461
A different reply format (defined by the PKCS #7 standard) includes the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2462
supporting certificate chain in addition to the issued certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2463
Both reply formats can be handled by the \f[CB]keytool\f[R] command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2464
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2465
The top\-level (root) CA certificate is self\-signed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2466
However, the trust into the root\[aq]s public key doesn\[aq]t come from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2467
the root certificate itself, but from other sources such as a newspaper.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2468
This is because anybody could generate a self\-signed certificate with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2469
the distinguished name of, for example, the DigiCert root CA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2470
The root CA public key is widely known.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2471
The only reason it is stored in a certificate is because this is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2472
format understood by most tools, so the certificate in this case is only
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2473
used as a vehicle to transport the root CA\[aq]s public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2474
Before you add the root CA certificate to your keystore, you should view
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2475
it with the \f[CB]\-printcert\f[R] option and compare the displayed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2476
fingerprint with the well\-known fingerprint obtained from a newspaper,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2477
the root CA\[aq]s Web page, and so on.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2478
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2479
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2480
.B cacerts Certificates File
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2481
A certificates file named \f[CB]cacerts\f[R] resides in the security
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2482
properties directory:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2483
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2484
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2485
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2486
\f[I]JAVA_HOME\f[R]\f[CB]/lib/security\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2487
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2488
\f[B]Windows:\f[R] \f[I]JAVA_HOME\f[R]\f[CB]\\lib\\security\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2489
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2490
\f[I]JAVA_HOME\f[R] is the runtime environment directory, which is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2491
\f[CB]jre\f[R] directory in the JDK or the top\-level directory of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2492
Java Runtime Environment (JRE).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2493
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2494
The \f[CB]cacerts\f[R] file represents a system\-wide keystore with CA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2495
certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2496
System administrators can configure and manage that file with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2497
\f[CB]keytool\f[R] command by specifying \f[CB]jks\f[R] as the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2498
type.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2499
The \f[CB]cacerts\f[R] keystore file ships with a default set of root CA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2500
certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2501
For Oracle Solaris, Linux, OS X, and Windows, you can list the default
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2502
certificates with the following command:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2503
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2504
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2505
\f[CB]keytool\ \-list\ \-cacerts\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2506
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2507
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2508
The initial password of the \f[CB]cacerts\f[R] keystore file is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2509
\f[CB]changeit\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2510
System administrators should change that password and the default access
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2511
permission of that file upon installing the SDK.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2512
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2513
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2514
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2515
It is important to verify your \f[CB]cacerts\f[R] file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2516
Because you trust the CAs in the \f[CB]cacerts\f[R] file as entities for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2517
signing and issuing certificates to other entities, you must manage the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2518
\f[CB]cacerts\f[R] file carefully.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2519
The \f[CB]cacerts\f[R] file should contain only certificates of the CAs
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2520
you trust.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2521
It is your responsibility to verify the trusted root CA certificates
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2522
bundled in the \f[CB]cacerts\f[R] file and make your own trust decisions.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2523
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2524
To remove an untrusted CA certificate from the \f[CB]cacerts\f[R] file,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2525
use the \f[CB]\-delete\f[R] option of the \f[CB]keytool\f[R] command.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2526
You can find the \f[CB]cacerts\f[R] file in the JRE installation
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2527
directory.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2528
Contact your system administrator if you don\[aq]t have permission to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2529
edit this file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2530
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2531
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2532
.B Internet RFC 1421 Certificate Encoding Standard
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2533
Certificates are often stored using the printable encoding format
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2534
defined by the Internet RFC 1421 standard, instead of their binary
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2535
encoding.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2536
This certificate format, also known as Base64 encoding, makes it easy to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2537
export certificates to other applications by email or through some other
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2538
mechanism.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2539
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2540
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2541
Certificates read by the \f[CB]\-importcert\f[R] and \f[CB]\-printcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2542
commands can be in either this format or binary encoded.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2543
The \f[CB]\-exportcert\f[R] command by default outputs a certificate in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2544
binary encoding, but will instead output a certificate in the printable
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2545
encoding format, when the \f[CB]\-rfc\f[R] option is specified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2546
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2547
The \f[CB]\-list\f[R] command by default prints the SHA\-256 fingerprint
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2548
of a certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2549
If the \f[CB]\-v\f[R] option is specified, then the certificate is printed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2550
in human\-readable format.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2551
If the \f[CB]\-rfc\f[R] option is specified, then the certificate is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2552
output in the printable encoding format.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2553
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2554
In its printable encoding format, the encoded certificate is bounded at
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2555
the beginning and end by the following text:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2556
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2557
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2558
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2559
\-\-\-\-\-BEGIN\ CERTIFICATE\-\-\-\-\-
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2560
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2561
encoded\ certificate\ goes\ here.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2562
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2563
\-\-\-\-\-END\ CERTIFICATE\-\-\-\-\-
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2564
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2565
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2566
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2567
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2568
.B X.500 Distinguished Names
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2569
X.500 Distinguished Names are used to identify entities, such as those
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2570
that are named by the \f[CB]subject\f[R] and \f[CB]issuer\f[R] (signer)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2571
fields of X.509 certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2572
The \f[CB]keytool\f[R] command supports the following subparts:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2573
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2574
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2575
commonName: The common name of a person such as Susan Jones.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2576
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2577
organizationUnit: The small organization (such as department or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2578
division) name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2579
For example, Purchasing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2580
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2581
localityName: The locality (city) name, for example, Palo Alto.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2582
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2583
stateName: State or province name, for example, California.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2584
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2585
country: Two\-letter country code, for example, CH.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2586
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2587
When you supply a distinguished name string as the value of a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2588
\f[CB]\-dname\f[R] option, such as for the \f[CB]\-genkeypair\f[R] command,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2589
the string must be in the following format:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2590
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2591
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2592
\f[CB]CN=cName,\ OU=orgUnit,\ O=org,\ L=city,\ S=state,\ C=countryCode\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2593
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2594
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2595
All the following items represent actual values and the previous
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2596
keywords are abbreviations for the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2597
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2598
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2599
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2600
CN=commonName
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2601
OU=organizationUnit
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2602
O=organizationName
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2603
L=localityName
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2604
S=stateName
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2605
C=country
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2606
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2607
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2608
.PP
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2609
A sample distinguished name string is:
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2610
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2611
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2612
\f[CB]CN=Mark\ Smith,\ OU=Java,\ O=Oracle,\ L=Cupertino,\ S=California,\ C=US\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2613
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2614
.PP
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2615
A sample command using such a string is:
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2616
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2617
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2618
\f[CB]keytool\ \-genkeypair\ \-dname\ "CN=Mark\ Smith,\ OU=Java,\ O=Oracle,\ L=Cupertino,\ S=California,\ C=US"\ \-alias\ mark\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2619
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2620
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2621
Case doesn\[aq]t matter for the keyword abbreviations.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2622
For example, CN, cn, and Cn are all treated the same.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2623
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2624
Order matters; each subcomponent must appear in the designated order.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2625
However, it isn\[aq]t necessary to have all the subcomponents.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2626
You can use a subset, for example:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2627
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2628
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2629
\f[CB]CN=Smith,\ OU=Java,\ O=Oracle,\ C=US\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2630
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2631
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2632
If a distinguished name string value contains a comma, then the comma
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2633
must be escaped by a backslash (\\) character when you specify the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2634
string on a command line, as in:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2635
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2636
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2637
\f[CB]cn=Jack,\ ou=Java\\,\ Product\ Development,\ o=Oracle,\ c=US\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2638
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2639
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2640
It is never necessary to specify a distinguished name string on a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2641
command line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2642
When the distinguished name is needed for a command, but not supplied on
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2643
the command line, the user is prompted for each of the subcomponents.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2644
In this case, a comma doesn\[aq]t need to be escaped by a backslash
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2645
(\\).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2646
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2647
.SH WARNINGS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2648
.SH IMPORTING TRUSTED CERTIFICATES WARNING
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2649
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2650
\f[B]Important\f[R]: Be sure to check a certificate very carefully before
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2651
importing it as a trusted certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2652
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2653
\f[B]Windows Example:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2654
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2655
View the certificate first with the \f[CB]\-printcert\f[R] command or the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2656
\f[CB]\-importcert\f[R] command without the \f[CB]\-noprompt\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2657
Ensure that the displayed certificate fingerprints match the expected
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2658
ones.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2659
For example, suppose someone sends or emails you a certificate that you
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2660
put it in a file named \f[CB]\\tmp\\cert\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2661
Before you consider adding the certificate to your list of trusted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2662
certificates, you can execute a \f[CB]\-printcert\f[R] command to view its
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2663
fingerprints, as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2664
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2665
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2666
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2667
\ \ keytool\ \-printcert\ \-file\ \\tmp\\cert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2668
\ \ \ \ Owner:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2669
\ \ \ \ Issuer:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2670
\ \ \ \ Serial\ Number:\ 59092b34
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2671
\ \ \ \ Valid\ from:\ Thu\ Jun\ 24\ 18:01:13\ PDT\ 2016\ until:\ Wed\ Jun\ 23\ 17:01:13\ PST\ 2016
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2672
\ \ \ \ Certificate\ Fingerprints:
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
  2673
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2674
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-1:\ 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2675
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-256:\ 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2676
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2677
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2678
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2679
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2680
\f[B]Oracle Solaris Example:\f[R]
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2681
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2682
View the certificate first with the \f[CB]\-printcert\f[R] command or the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2683
\f[CB]\-importcert\f[R] command without the \f[CB]\-noprompt\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2684
Ensure that the displayed certificate fingerprints match the expected
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2685
ones.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2686
For example, suppose someone sends or emails you a certificate that you
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2687
put it in a file named \f[CB]/tmp/cert\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2688
Before you consider adding the certificate to your list of trusted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2689
certificates, you can execute a \f[CB]\-printcert\f[R] command to view its
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2690
fingerprints, as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2691
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2692
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2693
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2694
\ \ keytool\ \-printcert\ \-file\ /tmp/cert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2695
\ \ \ \ Owner:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2696
\ \ \ \ Issuer:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2697
\ \ \ \ Serial\ Number:\ 59092b34
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2698
\ \ \ \ Valid\ from:\ Thu\ Jun\ 24\ 18:01:13\ PDT\ 2016\ until:\ Wed\ Jun\ 23\ 17:01:13\ PST\ 2016
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2699
\ \ \ \ Certificate\ Fingerprints:
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
  2700
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2701
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-1:\ 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2702
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-256:\ 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2703
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2704
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2705
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2706
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2707
Then call or otherwise contact the person who sent the certificate and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2708
compare the fingerprints that you see with the ones that they show.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2709
Only when the fingerprints are equal is it guaranteed that the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2710
certificate wasn\[aq]t replaced in transit with somebody else\[aq]s
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2711
certificate such as an attacker\[aq]s certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2712
If such an attack took place, and you didn\[aq]t check the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2713
before you imported it, then you would be trusting anything the attacker
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2714
signed, for example, a JAR file with malicious class files inside.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2715
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2716
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2717
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2718
It isn\[aq]t required that you execute a \f[CB]\-printcert\f[R] command
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2719
before importing a certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2720
This is because before you add a certificate to the list of trusted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2721
certificates in the keystore, the \f[CB]\-importcert\f[R] command prints
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2722
out the certificate information and prompts you to verify it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2723
You can then stop the import operation.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2724
However, you can do this only when you call the \f[CB]\-importcert\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2725
command without the \f[CB]\-noprompt\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2726
If the \f[CB]\-noprompt\f[R] option is specified, then there is no
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2727
interaction with the user.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2728
.SH PASSWORDS WARNING
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2729
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2730
Most commands that operate on a keystore require the store password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2731
Some commands require a private/secret key password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2732
Passwords can be specified on the command line in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2733
\f[CB]\-storepass\f[R] and \f[CB]\-keypass\f[R] options.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2734
However, a password shouldn\[aq]t be specified on a command line or in a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2735
script unless it is for testing, or you are on a secure system.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2736
When you don\[aq]t specify a required password option on a command line,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2737
you are prompted for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2738
.SH CERTIFICATE CONFORMANCE WARNING
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2739
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2740
\f[B]Internet X.509 Public Key Infrastructure Certificate and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2741
Certificate Revocation List (CRL) Profile\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2742
[https://tools.ietf.org/rfc/rfc5280.txt] defined a profile on conforming
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2743
X.509 certificates, which includes what values and value combinations
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2744
are valid for certificate fields and extensions.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2745
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2746
The \f[CB]keytool\f[R] command doesn\[aq]t enforce all of these rules so
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2747
it can generate certificates that don\[aq]t conform to the standard,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2748
such as self\-signed certificates that would be used for internal
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2749
testing purposes.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2750
Certificates that don\[aq]t conform to the standard might be rejected by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2751
JRE or other applications.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2752
Users should ensure that they provide the correct options for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2753
\f[CB]\-dname\f[R], \f[CB]\-ext\f[R], and so on.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2754
.SH IMPORT A NEW TRUSTED CERTIFICATE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2755
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2756
Before you add the certificate to the keystore, the \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2757
command verifies it by attempting to construct a chain of trust from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2758
that certificate to a self\-signed certificate (belonging to a root CA),
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2759
using trusted certificates that are already available in the keystore.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2760
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2761
If the \f[CB]\-trustcacerts\f[R] option was specified, then additional
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2762
certificates are considered for the chain of trust, namely the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2763
certificates in a file named \f[CB]cacerts\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2764
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2765
If the \f[CB]keytool\f[R] command fails to establish a trust path from the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2766
certificate to be imported up to a self\-signed certificate (either from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2767
the keystore or the \f[CB]cacerts\f[R] file), then the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2768
information is printed, and the user is prompted to verify it by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2769
comparing the displayed certificate fingerprints with the fingerprints
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2770
obtained from some other (trusted) source of information, which might be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2771
the certificate owner.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2772
Be very careful to ensure the certificate is valid before importing it
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2773
as a trusted certificate.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2774
The user then has the option of stopping the import operation.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2775
If the \f[CB]\-noprompt\f[R] option is specified, then there is no
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2776
interaction with the user.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2777
.SH IMPORT A CERTIFICATE REPLY
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2778
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2779
When you import a certificate reply, the certificate reply is validated
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2780
with trusted certificates from the keystore, and optionally, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2781
certificates configured in the \f[CB]cacerts\f[R] keystore file when the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2782
\f[CB]\-trustcacerts\f[R] option is specified.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2783
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2784
The methods of determining whether the certificate reply is trusted are
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2785
as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2786
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2787
If the reply is a single X.509 certificate, then the \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2788
command attempts to establish a trust chain, starting at the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2789
reply and ending at a self\-signed certificate (belonging to a root CA).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2790
The certificate reply and the hierarchy of certificates is used to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2791
authenticate the certificate reply from the new certificate chain of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2792
aliases.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2793
If a trust chain can\[aq]t be established, then the certificate reply
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2794
isn\[aq]t imported.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2795
In this case, the \f[CB]keytool\f[R] command doesn\[aq]t print the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2796
certificate and prompt the user to verify it, because it is very
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2797
difficult for a user to determine the authenticity of the certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2798
reply.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2799
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2800
If the reply is a PKCS #7 formatted certificate chain or a sequence of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2801
X.509 certificates, then the chain is ordered with the user certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2802
first followed by zero or more CA certificates.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2803
If the chain ends with a self\-signed root CA certificate and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2804
the\f[CB]\-trustcacerts\f[R] option was specified, the \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2805
command attempts to match it with any of the trusted certificates in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2806
keystore or the \f[CB]cacerts\f[R] keystore file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2807
If the chain doesn\[aq]t end with a self\-signed root CA certificate and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2808
the \f[CB]\-trustcacerts\f[R] option was specified, the \f[CB]keytool\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2809
command tries to find one from the trusted certificates in the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2810
or the \f[CB]cacerts\f[R] keystore file and add it to the end of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2811
chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2812
If the certificate isn\[aq]t found and the \f[CB]\-noprompt\f[R] option
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2813
isn\[aq]t specified, the information of the last certificate in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2814
chain is printed, and the user is prompted to verify it.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2815
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2816
If the public key in the certificate reply matches the user\[aq]s public
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2817
key already stored with \f[CB]alias\f[R], then the old certificate chain
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2818
is replaced with the new certificate chain in the reply.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2819
The old chain can only be replaced with a valid \f[CB]keypass\f[R], and so
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2820
the password used to protect the private key of the entry is supplied.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2821
If no password is provided, and the private key password is different
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2822
from the keystore password, the user is prompted for it.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  2823
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2824
This command was named \f[CB]\-import\f[R] in earlier releases.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2825
This old name is still supported in this release.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  2826
The new name, \f[CB]\-importcert\f[R], is preferred.