src/jdk.jartool/share/man/jarsigner.1
author darcy
Tue, 12 Nov 2019 10:45:23 -0800
changeset 59037 3d2575331a41
parent 55140 d4890c3721be
permissions -rw-r--r--
8233940: Preview API tests for String methods should use ${jdk.version} as -source arg Reviewed-by: jlaskey, jlahoda
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 "JARSIGNER" "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
jarsigner \- sign and verify Java Archive (JAR) files
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]jarsigner\f[R] [\f[I]options\f[R]] \f[I]jar\-file\f[R] \f[I]alias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    33
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    34
\f[CB]jarsigner\f[R] \f[CB]\-verify\f[R] [\f[I]options\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    35
\f[I]jar\-file\f[R] [\f[I]alias\f[R] ...]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    36
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    37
.B \f[I]options\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    38
The command\-line options.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    39
See \f[B]Options for jarsigner\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    40
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    41
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    42
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    43
.B \f[CB]\-verify\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    44
The \f[CB]\-verify\f[R] option can take zero or more keystore alias names
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    45
after the JAR file name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    46
When the \f[CB]\-verify\f[R] option is specified, the \f[CB]jarsigner\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    47
command checks that the certificate used to verify each signed entry in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    48
the JAR file matches one of the keystore aliases.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    49
The aliases are defined in the keystore specified by \f[CB]\-keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    50
or the default keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    51
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    52
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    53
If you also specify the \f[CB]\-strict\f[R] option, and the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    54
\f[CB]jarsigner\f[R] command detects severe warnings, the message, "jar
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    55
verified, with signer errors" is displayed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    56
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    57
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    58
.B \f[I]jar\-file\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    59
The JAR file to be signed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    60
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    61
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    62
If you also specified the \f[CB]\-strict\f[R] option, and the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    63
\f[CB]jarsigner\f[R] command detected severe warnings, the message, "jar
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    64
signed, with signer errors" is displayed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    65
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    66
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    67
.B \f[I]alias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    68
The aliases are defined in the keystore specified by \f[CB]\-keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    69
or the default keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    70
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    71
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    72
.SH DESCRIPTION
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
The \f[CB]jarsigner\f[R] tool has two purposes:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    75
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    76
To sign Java Archive (JAR) files.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    77
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    78
To verify the signatures and integrity of signed JAR files.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    79
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    80
The JAR feature enables the packaging of class files, images, sounds,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    81
and other digital data in a single file for faster and easier
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    82
distribution.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    83
A tool named \f[CB]jar\f[R] enables developers to produce JAR files.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    84
(Technically, any ZIP file can also be considered a JAR file, although
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    85
when created by the \f[CB]jar\f[R] command or processed by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    86
\f[CB]jarsigner\f[R] command, JAR files also contain a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    87
\f[CB]META\-INF/MANIFEST.MF\f[R] file.)
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    88
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    89
A digital signature is a string of bits that is computed from some data
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    90
(the data being signed) and the private key of an entity (a person,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    91
company, and so on).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    92
Similar to a handwritten signature, a digital signature has many useful
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    93
characteristics:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    94
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    95
Its authenticity can be verified by a computation that uses the public
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    96
key corresponding to the private key used to generate the signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    97
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    98
It can\[aq]t be forged, assuming the private key is kept secret.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
    99
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   100
It is a function of the data signed and thus can\[aq]t be claimed to be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   101
the signature for other data as well.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   102
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   103
The signed data can\[aq]t be changed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   104
If the data is changed, then the signature can\[aq]t be verified as
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   105
authentic.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   106
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   107
To generate an entity\[aq]s signature for a file, the entity must first
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   108
have a public/private key pair associated with it and one or more
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   109
certificates that authenticate its public key.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   110
A certificate is a digitally signed statement from one entity that says
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   111
that the public key of another entity has a particular value.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   112
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   113
The \f[CB]jarsigner\f[R] command uses key and certificate information from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   114
a keystore to generate digital signatures for JAR files.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   115
A keystore is a database of private keys and their associated X.509
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   116
certificate chains that authenticate the corresponding public keys.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   117
The \f[CB]keytool\f[R] command is used to create and administer keystores.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   118
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   119
The \f[CB]jarsigner\f[R] command uses an entity\[aq]s private key to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   120
generate a signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   121
The signed JAR file contains, among other things, a copy of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   122
certificate from the keystore for the public key corresponding to the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   123
private key used to sign the file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   124
The \f[CB]jarsigner\f[R] command can verify the digital signature of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   125
signed JAR file using the certificate inside it (in its signature block
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   126
file).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   127
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   128
The \f[CB]jarsigner\f[R] command can generate signatures that include a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   129
time stamp that enables a systems or deployer to check whether the JAR
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   130
file was signed while the signing certificate was still valid.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   131
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   132
In addition, APIs allow applications to obtain the timestamp
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   133
information.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   134
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   135
At this time, the \f[CB]jarsigner\f[R] command can only sign JAR files
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   136
created by the \f[CB]jar\f[R] command or zip files.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   137
JAR files are the same as zip files, except they also have a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   138
\f[CB]META\-INF/MANIFEST.MF\f[R] file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   139
A \f[CB]META\-INF/MANIFEST.MF\f[R] file is created when the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   140
\f[CB]jarsigner\f[R] command signs a zip file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   141
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   142
The default \f[CB]jarsigner\f[R] command behavior is to sign a JAR or zip
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   143
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   144
Use the \f[CB]\-verify\f[R] option to verify a signed JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   145
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   146
The \f[CB]jarsigner\f[R] command also attempts to validate the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   147
signer\[aq]s certificate after signing or verifying.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   148
If there is a validation error or any other problem, the command
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   149
generates warning messages.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   150
If you specify the \f[CB]\-strict\f[R] option, then the command treats
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   151
severe warnings as errors.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   152
See \f[B]Errors and Warnings\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   153
.SH KEYSTORE ALIASES
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   154
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   155
All keystore entities are accessed with unique aliases.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   156
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   157
When you use the \f[CB]jarsigner\f[R] command to sign a JAR file, you must
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   158
specify the alias for the keystore entry that contains the private key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   159
needed to generate the signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   160
If no output file is specified, it overwrites the original JAR file with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   161
the signed JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   162
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   163
Keystores are protected with a password, so the store password must be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   164
specified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   165
You are prompted for it when you don\[aq]t specify it on the command
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   166
line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   167
Similarly, private keys are protected in a keystore with a password, so
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   168
the private key\[aq]s password must be specified, and you are prompted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   169
for the password when you don\[aq]t specify it on the command line and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   170
it isn\[aq]t the same as the store password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   171
.SH KEYSTORE LOCATION
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   172
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   173
The \f[CB]jarsigner\f[R] command has a \f[CB]\-keystore\f[R] option for
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   174
specifying the URL of the keystore to be used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   175
The keystore is by default stored in a file named \f[CB]\&.keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   176
in the user\[aq]s home directory, as determined by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   177
\f[CB]user.home\f[R] system property.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   178
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   179
\f[B]Oracle Solaris, Linux, and OS X:\f[R] \f[CB]user.home\f[R] defaults to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   180
the user\[aq]s home directory.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   181
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   182
The input stream from the \f[CB]\-keystore\f[R] option is passed to the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   183
\f[CB]KeyStore.load\f[R] method.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   184
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
   185
to the \f[CB]KeyStore.load\f[R] method.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   186
\f[CB]NONE\f[R] should be specified when the \f[CB]KeyStore\f[R] class
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   187
isn\[aq]t file based, for example, when it resides on a hardware token
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   188
device.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   189
.SH KEYSTORE IMPLEMENTATION
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   190
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   191
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
   192
package supplies a number of well\-defined interfaces to access and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   193
modify the information in a keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   194
You can have multiple different concrete implementations, where each
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   195
implementation is for a particular type of keystore.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   196
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   197
Currently, there are two command\-line tools that use keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   198
implementations (\f[CB]keytool\f[R] and \f[CB]jarsigner\f[R]).
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   199
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   200
The default keystore implementation is \f[CB]PKCS12\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   201
This is a cross platform keystore based on the RSA PKCS12 Personal
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   202
Information Exchange Syntax Standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   203
This standard is primarily meant for storing or transporting a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   204
user\[aq]s private keys, certificates, and miscellaneous secrets.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   205
There is another built\-in implementation, provided by Oracle.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   206
It implements the keystore as a file with a proprietary keystore type
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   207
(format) named \f[CB]JKS\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   208
It protects each private key with its individual password, and also
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   209
protects the integrity of the entire keystore with a (possibly
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   210
different) password.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   211
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   212
Keystore implementations are provider\-based, which means the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   213
application interfaces supplied by the \f[CB]KeyStore\f[R] class are
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   214
implemented in terms of a Service Provider Interface (SPI).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   215
There is a corresponding abstract \f[CB]KeystoreSpi\f[R] class, also in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   216
the \f[CB]java.security\ package\f[R], that defines the Service Provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   217
Interface methods that providers must implement.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   218
The term provider refers to a package or a set of packages that supply a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   219
concrete implementation of a subset of services that can be accessed by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   220
the Java Security API.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   221
To provide a keystore implementation, clients must implement a provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   222
and supply a \f[CB]KeystoreSpi\f[R] subclass implementation, as described
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   223
in \f[B]How to Implement a Provider in the Java Cryptography
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   224
Architecture\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   225
[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase/11/tools&id=JSSEC\-GUID\-2BCFDD85\-D533\-4E6C\-8CE9\-29990DEB0190].
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   226
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   227
Applications can choose different types of keystore implementations from
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   228
different providers, with the \f[CB]getInstance\f[R] factory method in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   229
\f[CB]KeyStore\f[R] class.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   230
A keystore type defines the storage and data format of the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   231
information and the algorithms used to protect private keys in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   232
keystore and the integrity of the keystore itself.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   233
Keystore implementations of different types aren\[aq]t compatible.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   234
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   235
The \f[CB]jarsigner\f[R] commands can read file\-based keystores from any
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   236
location that can be specified using a URL.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   237
In addition, these commands can read non\-file\-based keystores such as
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   238
those provided by MSCAPI on Windows and PKCS11 on all platforms.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   239
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   240
For the \f[CB]jarsigner\f[R] and \f[CB]keytool\f[R] commands, you can
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   241
specify a keystore type at the command line with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   242
\f[CB]\-storetype\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   243
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   244
If you don\[aq]t explicitly specify a keystore type, then the tools
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   245
choose a keystore implementation based on the value of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   246
\f[CB]keystore.type\f[R] property specified in the security properties
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   247
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   248
The security properties file is called \f[CB]java.security\f[R], and it
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   249
resides in the JDK security properties directory,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   250
\f[CB]java.home/conf/security\f[R].
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   251
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   252
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
   253
the installed providers until it finds one that implements keystores of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   254
that type.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   255
It then uses the keystore implementation from that provider.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   256
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   257
The \f[CB]KeyStore\f[R] class defines a static method named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   258
\f[CB]getDefaultType\f[R] that lets applications retrieve the value of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   259
\f[CB]keystore.type\f[R] property.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   260
The following line of code creates an instance of the default keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   261
type as specified in the \f[CB]keystore.type\f[R] property:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   262
.RS
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   263
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   264
\f[CB]KeyStore\ keyStore\ =\ KeyStore.getInstance(KeyStore.getDefaultType());\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   265
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   266
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   267
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
   268
keystore based on the RSA PKCS12 Personal Information Exchange Syntax
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   269
Standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   270
This is specified by the following line in the security properties file:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   271
.RS
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   272
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   273
\f[CB]keystore.type=pkcs12\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   274
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   275
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   276
Case doesn\[aq]t matter in keystore type designations.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   277
For example, \f[CB]JKS\f[R] is the same as \f[CB]jks\f[R].
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   278
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   279
To have the tools utilize a keystore implementation other than the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   280
default, you can change that line to specify a different keystore type.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   281
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
   282
implementation, then change the line to the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   283
.RS
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   284
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   285
\f[CB]keystore.type=jks\f[R]
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
.SH SUPPORTED ALGORITHMS
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   288
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   289
By default, the \f[CB]jarsigner\f[R] command signs a JAR file using one of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   290
the following algorithms files depending on the type and size of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   291
private key:
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   292
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   293
.TS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   294
tab(@);
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   295
l l l.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   296
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   297
keyalg
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   298
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   299
keysize
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   300
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   301
default sigalg
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   302
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   303
_
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   304
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   305
DSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   306
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   307
any size
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   308
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   309
SHA256withDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   310
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   311
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   312
RSA \ \ \ 
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   313
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   314
<= 3072
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   315
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   316
SHA256withRSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   317
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   318
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   319
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   320
<= 7680
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   321
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   322
SHA384withRSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   323
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   324
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   325
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   326
> 7680
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   327
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   328
SHA512withRSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   329
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   330
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   331
EC
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   332
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   333
< 384
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   334
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   335
SHA256withECDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   336
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   337
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   338
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   339
< 512
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   340
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   341
SHA384withECDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   342
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   343
T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   344
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   345
= 512
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   346
T}@T{
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   347
SHA512withECDSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   348
T}
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   349
.TE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   350
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   351
These default signature algorithms can be overridden by using the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   352
\f[CB]\-sigalg\f[R] option.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   353
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   354
Signed JAR file algorithms are checked against the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   355
\f[CB]jdk.jar.disabledAlgorithms\f[R] security property during
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   356
verification (\f[CB]\-verify\f[R]).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   357
If the JAR file was signed with any algorithms that are disabled, it
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   358
will be treated as an unsigned JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   359
For detailed verification output, include
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   360
\f[CB]\-J\-Djava.security.debug=jar\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   361
The default value for the \f[CB]jdk.jar.disabledAlgorithms\f[R] security
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   362
property is defined in the \f[CB]java.security\f[R] file (located in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   363
JRE\[aq]s \f[CB]$JAVA_HOME/conf/security\f[R] directory).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   364
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   365
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   366
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   367
In order to improve out of the box security, default key size and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   368
signature algorithm names are periodically updated to stronger values
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   369
with each release of the JDK.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   370
If interoperability with older releases of the JDK is important, please
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   371
make sure the defaults are supported by those releases, or alternatively
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   372
use the \f[CB]\-sigalg\f[R] option to override the default values at your
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   373
own risk.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   374
.SH THE SIGNED JAR FILE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   375
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   376
When the \f[CB]jarsigner\f[R] command is used to sign a JAR file, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   377
output signed JAR file is exactly the same as the input JAR file, except
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   378
that it has two additional files placed in the META\-INF directory:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   379
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   380
A signature file with an \f[CB]\&.SF\f[R] extension
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
A signature block file with a \f[CB]\&.DSA\f[R], \f[CB]\&.RSA\f[R], or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   383
\f[CB]\&.EC\f[R] extension
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   384
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   385
The base file names for these two files come from the value of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   386
\f[CB]\-sigfile\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   387
For example, when the option is \f[CB]\-sigfile\ MKSIGN\f[R], the files
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   388
are named \f[CB]MKSIGN.SF\f[R] and \f[CB]MKSIGN.DSA\f[R]
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   389
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   390
If no \f[CB]\-sigfile\f[R] option appears on the command line, then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   391
base file name for the \f[CB]\&.SF\f[R] and \f[CB]\&.DSA\f[R] files is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   392
first 8 characters of the alias name specified on the command line, all
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   393
converted to uppercase.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   394
If the alias name has fewer than 8 characters, then the full alias name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   395
is used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   396
If the alias name contains any characters that aren\[aq]t allowed in a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   397
signature file name, then each such character is converted to an
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   398
underscore (_) character in forming the file name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   399
Valid characters include letters, digits, underscores, and hyphens.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   400
.SH SIGNATURE FILE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   401
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   402
A signature file (\f[CB]\&.SF\f[R] file) looks similar to the manifest
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   403
file that is always included in a JAR file when the \f[CB]jarsigner\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   404
command is used to sign the file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   405
For each source file included in the JAR file, the \f[CB]\&.SF\f[R] file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   406
has two lines, such as in the manifest file, that list the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   407
.IP \[bu] 2
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   408
File name
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   409
.IP \[bu] 2
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   410
Name of the digest algorithm (SHA)
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   411
.IP \[bu] 2
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   412
SHA digest value
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   413
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   414
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   415
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   416
The name of the digest algorithm (SHA) and the SHA digest value are on
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   417
the same line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   418
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   419
In the manifest file, the SHA digest value for each source file is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   420
digest (hash) of the binary data in the source file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   421
In the \f[CB]\&.SF\f[R] file, the digest value for a specified source file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   422
is the hash of the two lines in the manifest file for the source file.
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 signature file, by default, includes a header with a hash of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   425
whole manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   426
The header also contains a hash of the manifest header.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   427
The presence of the header enables verification optimization.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   428
See \f[B]JAR File Verification\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   429
.SH SIGNATURE BLOCK FILE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   430
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   431
The \f[CB]\&.SF\f[R] file is signed and the signature is placed in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   432
signature block file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   433
This file also contains, encoded inside it, the certificate or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   434
certificate chain from the keystore that authenticates the public key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   435
corresponding to the private key used for signing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   436
The file has the extension \f[CB]\&.DSA\f[R], \f[CB]\&.RSA\f[R], or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   437
\f[CB]\&.EC\f[R], depending on the digest algorithm used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   438
.SH SIGNATURE TIME STAMP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   439
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   440
The \f[CB]jarsigner\f[R] command used with the following options generates
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   441
and stores a signature time stamp when signing a JAR file:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   442
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   443
\f[CB]\-tsa\f[R] \f[I]url\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   444
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   445
\f[CB]\-tsacert\f[R] \f[I]alias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   446
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   447
\f[CB]\-tsapolicyid\f[R] \f[I]policyid\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   448
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   449
\f[CB]\-tsadigestalg\f[R] \f[I]algorithm\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
See \f[B]Options for jarsigner\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   452
.SH JAR FILE VERIFICATION
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
A successful JAR file verification occurs when the signatures are valid,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   455
and none of the files that were in the JAR file when the signatures were
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   456
generated have changed since then.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   457
JAR file verification involves the following steps:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   458
.IP "1." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   459
Verify the signature of the \f[CB]\&.SF\f[R] file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   460
.RS 4
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   461
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   462
The verification ensures that the signature stored in each signature
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   463
block (\f[CB]\&.DSA\f[R]) file was generated using the private key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   464
corresponding to the public key whose certificate (or certificate chain)
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   465
also appears in the \f[CB]\&.DSA\f[R] file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   466
It also ensures that the signature is a valid signature of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   467
corresponding signature (\f[CB]\&.SF\f[R]) file, and thus the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   468
\f[CB]\&.SF\f[R] file wasn\[aq]t tampered with.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   469
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   470
.IP "2." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   471
Verify the digest listed in each entry in the \f[CB]\&.SF\f[R] file with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   472
each corresponding section in the manifest.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   473
.RS 4
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   474
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   475
The \f[CB]\&.SF\f[R] file by default includes a header that contains a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   476
hash of the entire manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   477
When the header is present, the verification can check to see whether or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   478
not the hash in the header matches the hash of the manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   479
If there is a match, then verification proceeds to the next step.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   480
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   481
If there is no match, then a less optimized verification is required to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   482
ensure that the hash in each source file information section in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   483
\f[CB]\&.SF\f[R] file equals the hash of its corresponding section in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   484
manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   485
See Signature File.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   486
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   487
One reason the hash of the manifest file that is stored in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   488
\f[CB]\&.SF\f[R] file header might not equal the hash of the current
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   489
manifest file is that one or more files were added to the JAR file (with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   490
the \f[CB]jar\f[R] tool) after the signature and \f[CB]\&.SF\f[R] file were
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   491
generated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   492
When the \f[CB]jar\f[R] tool is used to add files, the manifest file is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   493
changed by adding sections to it for the new files, but the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   494
\f[CB]\&.SF\f[R] file isn\[aq]t changed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   495
A verification is still considered successful when none of the files
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   496
that were in the JAR file when the signature was generated have been
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   497
changed since then.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   498
This happens when the hashes in the non\-header sections of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   499
\f[CB]\&.SF\f[R] file equal the hashes of the corresponding sections in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   500
the manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   501
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   502
.IP "3." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   503
Read each file in the JAR file that has an entry in the \f[CB]\&.SF\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   504
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   505
While reading, compute the file\[aq]s digest and compare the result with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   506
the digest for this file in the manifest section.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   507
The digests should be the same or verification fails.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   508
.RS 4
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   509
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   510
If any serious verification failures occur during the verification
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   511
process, then the process is stopped and a security exception is thrown.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   512
The \f[CB]jarsigner\f[R] command catches and displays the exception.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   513
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   514
.IP "4." 3
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   515
Check for disabled algorithm usage.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   516
See \f[B]Supported Algorithms\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   517
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   518
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   519
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   520
You should read any addition warnings (or errors if you specified the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   521
\f[CB]\-strict\f[R] option), as well as the content of the certificate (by
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   522
specifying the \f[CB]\-verbose\f[R] and \f[CB]\-certs\f[R] options) to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   523
determine if the signature can be trusted.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   524
.SH MULTIPLE SIGNATURES FOR A JAR FILE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   525
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   526
A JAR file can be signed by multiple people by running the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   527
\f[CB]jarsigner\f[R] command on the file multiple times and specifying the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   528
alias for a different person each time, as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   529
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   530
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   531
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   532
jarsigner\ myBundle.jar\ susan
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   533
jarsigner\ myBundle.jar\ kevin
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   534
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   535
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   536
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   537
When a JAR file is signed multiple times, there are multiple
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   538
\f[CB]\&.SF\f[R] and \f[CB]\&.DSA\f[R] files in the resulting JAR file, one
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   539
pair for each signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   540
In the previous example, the output JAR file includes files with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   541
following names:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   542
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   543
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   544
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   545
SUSAN.SF
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   546
SUSAN.DSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   547
KEVIN.SF
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   548
KEVIN.DSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   549
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   550
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   551
.SH OPTIONS FOR JARSIGNER
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   552
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   553
The following sections describe the options for the \f[CB]jarsigner\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   554
Be aware of the following standards:
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
All option names are preceded by a hyphen sign (\-).
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
The options can be provided in any order.
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
Items that are in italics or underlined (option values) represent the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   561
actual values that must be supplied.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   562
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   563
The \f[CB]\-storepass\f[R], \f[CB]\-keypass\f[R], \f[CB]\-sigfile\f[R],
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   564
\f[CB]\-sigalg\f[R], \f[CB]\-digestalg\f[R], \f[CB]\-signedjar\f[R], and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   565
TSA\-related options are only relevant when signing a JAR file; they
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   566
aren\[aq]t relevant when verifying a signed JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   567
The \f[CB]\-keystore\f[R] option is relevant for signing and verifying a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   568
JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   569
In addition, aliases are specified when signing and verifying a JAR
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   570
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   571
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   572
.B \f[CB]\-keystore\f[R] \f[I]url\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   573
Specifies the URL that tells the keystore location.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   574
This defaults to the file \f[CB]\&.keystore\f[R] in the user\[aq]s home
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   575
directory, as determined by the \f[CB]user.home\f[R] system property.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   576
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   577
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   578
A keystore is required when signing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   579
You must explicitly specify a keystore when the default keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   580
doesn\[aq]t exist or if you want to use one other than the default.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   581
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   582
A keystore isn\[aq]t required when verifying, but if one is specified or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   583
the default exists and the \f[CB]\-verbose\f[R] option was also specified,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   584
then additional information is output regarding whether or not any of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   585
the certificates used to verify the JAR file are contained in that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   586
keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   587
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   588
The \f[CB]\-keystore\f[R] argument can be a file name and path
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   589
specification rather than a URL, in which case it is treated the same as
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   590
a file: URL, for example, the following are equivalent:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   591
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   592
\f[CB]\-keystore\f[R] \f[I]filePathAndName\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   593
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   594
\f[CB]\-keystore\ file:\f[R]\f[I]filePathAndName\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   595
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   596
If the Sun PKCS #11 provider was configured in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   597
\f[CB]java.security\f[R] security properties file (located in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   598
JRE\[aq]s \f[CB]$JAVA_HOME/conf/security\f[R] directory), then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   599
\f[CB]keytool\f[R] and \f[CB]jarsigner\f[R] tools can operate on the PKCS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   600
#11 token by specifying these options:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   601
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   602
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   603
\f[CB]\-keystore\ NONE\ \-storetype\ PKCS11\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   604
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   605
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   606
For example, the following command lists the contents of the configured
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   607
PKCS#11 token:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   608
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   609
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   610
\f[CB]keytool\ \-keystore\ NONE\ \-storetype\ PKCS11\ \-list\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   611
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   612
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   613
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   614
.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
   615
Specifies the password that is required to access the keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   616
This is only needed when signing (not verifying) a JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   617
In that case, if a \f[CB]\-storepass\f[R] option isn\[aq]t provided at the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   618
command line, then the user is prompted for the password.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   619
.RS
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   620
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   621
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
   622
the password has the value \f[CB]argument\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   623
Otherwise, the password is retrieved as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   624
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   625
\f[CB]env\f[R]: Retrieve the password from the environment variable named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   626
\f[I]argument\f[R].
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]file\f[R]: Retrieve the password from the file named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   629
\f[I]argument\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   630
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   631
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   632
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   633
The password shouldn\[aq]t be specified on the command line or in a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   634
script unless it is for testing purposes, or you are on a secure system.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   635
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   636
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   637
.B \f[CB]\-storetype\f[R] \f[I]storetype\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   638
Specifies the type of keystore to be instantiated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   639
The default keystore type is the one that is specified as the value of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   640
the \f[CB]keystore.type\f[R] property in the security properties file,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   641
which is returned by the static \f[CB]getDefaultType\f[R] method in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   642
\f[CB]java.security.KeyStore\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   643
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   644
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   645
The PIN for a PKCS #11 token can also be specified with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   646
\f[CB]\-storepass\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   647
If none is specified, then the \f[CB]keytool\f[R] and \f[CB]jarsigner\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   648
commands prompt for the token PIN.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   649
If the token has a protected authentication path (such as a dedicated
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   650
PIN\-pad or a biometric reader), then the \f[CB]\-protected\f[R] option
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   651
must be specified and no password options can be specified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   652
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   653
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   654
.B \f[CB]\-keypass\f[R] [\f[CB]:env\f[R] | \f[CB]:file\f[R]] \f[I]argument\f[R] \f[CB]\-certchain\f[R] \f[I]file\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   655
Specifies the password used to protect the private key of the keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   656
entry addressed by the alias specified on the command line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   657
The password is required when using \f[CB]jarsigner\f[R] to sign a JAR
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   658
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   659
If no password is provided on the command line, and the required
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   660
password is different from the store password, then the user is prompted
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   661
for it.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   662
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   663
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   664
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
   665
the password has the value \f[CB]argument\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   666
Otherwise, the password is retrieved as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   667
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   668
\f[CB]env\f[R]: Retrieve the password from the environment variable named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   669
\f[I]argument\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   670
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   671
\f[CB]file\f[R]: Retrieve the password from the file named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   672
\f[I]argument\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   673
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   674
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   675
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   676
The password shouldn\[aq]t be specified on the command line or in a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   677
script unless it is for testing purposes, or you are on a secure system.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   678
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   679
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   680
.B \f[CB]\-certchain\f[R] \f[I]file\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   681
Specifies the certificate chain to be used when the certificate chain
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   682
associated with the private key of the keystore entry that is addressed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   683
by the alias specified on the command line isn\[aq]t complete.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   684
This can happen when the keystore is located on a hardware token where
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   685
there isn\[aq]t enough capacity to hold a complete certificate chain.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   686
The file can be a sequence of concatenated X.509 certificates, or a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   687
single PKCS#7 formatted data block, either in binary encoding format or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   688
in printable encoding format (also known as Base64 encoding) as defined
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   689
by \f[B]Internet RFC 1421 Certificate Encoding Standard\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   690
[http://tools.ietf.org/html/rfc1421].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   691
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   692
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   693
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   694
.B \f[CB]\-sigfile\f[R] \f[I]file\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   695
Specifies the base file name to be used for the generated \f[CB]\&.SF\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   696
and \f[CB]\&.DSA\f[R] files.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   697
For example, if file is \f[CB]DUKESIGN\f[R], then the generated
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   698
\f[CB]\&.SF\f[R] and \f[CB]\&.DSA\f[R] files are named \f[CB]DUKESIGN.SF\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   699
and \f[CB]DUKESIGN.DSA\f[R], and placed in the \f[CB]META\-INF\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   700
directory of the signed JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   701
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   702
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   703
The characters in the file must come from the set
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   704
\f[CB]a\-zA\-Z0\-9_\-\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   705
Only letters, numbers, underscore, and hyphen characters are allowed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   706
All lowercase characters are converted to uppercase for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   707
\f[CB]\&.SF\f[R] and \f[CB]\&.DSA\f[R] file names.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   708
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   709
If no \f[CB]\-sigfile\f[R] option appears on the command line, then the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   710
base file name for the \f[CB]\&.SF\f[R] and \f[CB]\&.DSA\f[R] files is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   711
first 8 characters of the alias name specified on the command line, all
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   712
converted to upper case.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   713
If the alias name has fewer than 8 characters, then the full alias name
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   714
is used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   715
If the alias name contains any characters that aren\[aq]t valid in a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   716
signature file name, then each such character is converted to an
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   717
underscore (_) character to form the file name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   718
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   719
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   720
.B \f[CB]\-signedjar\f[R] \f[I]file\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   721
Specifies the name of signed JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   722
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   723
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   724
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   725
.B \f[CB]\-digestalg\f[R] \f[I]algorithm\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   726
Specifies the name of the message digest algorithm to use when digesting
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   727
the entries of a JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   728
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   729
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   730
For a list of standard message digest algorithm names, see Java Security
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   731
Standard Algorithm Names.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   732
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   733
If this option isn\[aq]t specified, then \f[CB]SHA256\f[R] is used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   734
There must either be a statically installed provider supplying an
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   735
implementation of the specified algorithm or the user must specify one
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   736
with the \f[CB]\-addprovider\f[R] or \f[CB]\-providerClass\f[R] options;
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   737
otherwise, the command will not succeed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   738
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   739
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   740
.B \f[CB]\-sigalg\f[R] \f[I]algorithm\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   741
Specifies the name of the signature algorithm to use to sign the JAR
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   742
file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   743
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   744
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   745
This algorithm must be compatible with the private key used to sign the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   746
JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   747
If this option isn\[aq]t specified, then use a default algorithm
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   748
matching the private key as described in the \f[B]Supported
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   749
Algorithms\f[R] section.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   750
There must either be a statically installed provider supplying an
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   751
implementation of the specified algorithm or you must specify one with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   752
the \f[CB]\-addprovider\f[R] or \f[CB]\-providerClass\f[R] option;
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   753
otherwise, the command doesn\[aq]t succeed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   754
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   755
For a list of standard message digest algorithm names, see Java Security
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   756
Standard Algorithm Names.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   757
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   758
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   759
.B \f[CB]\-verify\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   760
Verifies a signed JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   761
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   762
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   763
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   764
.B \f[CB]\-verbose\f[R][\f[CB]:\f[R]\f[I]suboptions\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   765
When the \f[CB]\-verbose\f[R] option appears on the command line, it
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   766
indicates that the \f[CB]jarsigner\f[R] use the verbose mode when signing
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   767
or verifying with the suboptions determining how much information is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   768
shown.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   769
This causes the , which causes \f[CB]jarsigner\f[R] to output extra
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   770
information about the progress of the JAR signing or verification.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   771
The \f[I]suboptions\f[R] can be \f[CB]all\f[R], \f[CB]grouped\f[R], or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   772
\f[CB]summary\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   773
.RS
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]\-certs\f[R] option is also specified, then the default mode
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   776
(or suboption \f[CB]all\f[R]) displays each entry as it is being
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   777
processed, and after that, the certificate information for each signer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   778
of the JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   779
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   780
If the \f[CB]\-certs\f[R] and the \f[CB]\-verbose:grouped\f[R] suboptions
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   781
are specified, then entries with the same signer info are grouped and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   782
displayed together with their certificate information.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   783
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   784
If \f[CB]\-certs\f[R] and the \f[CB]\-verbose:summary\f[R] suboptions are
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   785
specified, then entries with the same signer information are grouped and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   786
displayed together with their certificate information.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   787
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   788
Details about each entry are summarized and displayed as \f[I]one entry
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   789
(and more)\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   790
See \f[B]Example of Verifying a Signed JAR File\f[R] and \f[B]Example of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   791
Verification with Certificate Information\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   792
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   793
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   794
.B \f[CB]\-certs\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   795
If the \f[CB]\-certs\f[R] option appears on the command line with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   796
\f[CB]\-verify\f[R] and \f[CB]\-verbose\f[R] options, then the output
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   797
includes certificate information for each signer of the JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   798
This information includes the name of the type of certificate (stored in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   799
the \f[CB]\&.DSA\f[R] file) that certifies the signer\[aq]s public key,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   800
and if the certificate is an X.509 certificate (an instance of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   801
\f[CB]java.security.cert.X509Certificate\f[R]), then the distinguished
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   802
name of the signer.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   803
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   804
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   805
The keystore is also examined.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   806
If no keystore value is specified on the command line, then the default
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   807
keystore file (if any) is checked.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   808
If the public key certificate for a signer matches an entry in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   809
keystore, then the alias name for the keystore entry for that signer is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   810
displayed in parentheses.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   811
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   812
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   813
.B \f[CB]\-tsa\f[R] \f[I]url\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   814
If \f[CB]\-tsa\ http://example.tsa.url\f[R] appears on the command line
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   815
when signing a JAR file then a time stamp is generated for the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   816
signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   817
The URL, \f[CB]http://example.tsa.url\f[R], identifies the location of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   818
Time Stamping Authority (TSA) and overrides any URL found with the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   819
\f[CB]\-tsacert\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   820
The \f[CB]\-tsa\f[R] option doesn\[aq]t require the TSA public key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   821
certificate to be present in the keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   822
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   823
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   824
To generate the time stamp, \f[CB]jarsigner\f[R] communicates with the TSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   825
with the Time\-Stamp Protocol (TSP) defined in RFC 3161.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   826
When successful, the time stamp token returned by the TSA is stored with
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   827
the signature in the signature block file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   828
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   829
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   830
.B \f[CB]\-tsacert\f[R] \f[I]alias\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   831
When \f[CB]\-tsacert\f[R] \f[I]alias\f[R] appears on the command line when
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   832
signing a JAR file, a time stamp is generated for the signature.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   833
The alias identifies the TSA public key certificate in the keystore that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   834
is in effect.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   835
The entry\[aq]s certificate is examined for a Subject Information Access
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   836
extension that contains a URL identifying the location of the TSA.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   837
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   838
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   839
The TSA public key certificate must be present in the keystore when
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   840
using the \f[CB]\-tsacert\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   841
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   842
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   843
.B \f[CB]\-tsapolicyid\f[R] \f[I]policyid\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   844
Specifies the object identifier (OID) that identifies the policy ID to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   845
be sent to the TSA server.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   846
If this option isn\[aq]t specified, no policy ID is sent and the TSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   847
server will choose a default policy ID.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   848
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   849
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   850
Object identifiers are defined by X.696, which is an ITU
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   851
Telecommunication Standardization Sector (ITU\-T) standard.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   852
These identifiers are typically period\-separated sets of non\-negative
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   853
digits like \f[CB]1.2.3.4\f[R], for example.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   854
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   855
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   856
.B \f[CB]\-tsadigestalg\f[R] \f[I]algorithm\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   857
Specifies the message digest algorithm that is used to generate the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   858
message imprint to be sent to the TSA server.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   859
If this option isn\[aq]t specified, SHA\-256 will be used.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   860
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   861
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   862
See \f[B]Supported Algorithms\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   863
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   864
For a list of standard message digest algorithm names, see Java Security
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   865
Standard Algorithm Names.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   866
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   867
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   868
.B \f[CB]\-internalsf\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   869
In the past, the \f[CB]\&.DSA\f[R] (signature block) file generated when a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   870
JAR file was signed included a complete encoded copy of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   871
\f[CB]\&.SF\f[R] file (signature file) also generated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   872
This behavior has been changed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   873
To reduce the overall size of the output JAR file, the \f[CB]\&.DSA\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   874
file by default doesn\[aq]t contain a copy of the \f[CB]\&.SF\f[R] file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   875
anymore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   876
If \f[CB]\-internalsf\f[R] appears on the command line, then the old
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   877
behavior is utilized.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   878
This option is useful for testing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   879
In practice, don\[aq]t use the \f[CB]\-internalsf\f[R] option because it
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   880
incurs higher overhead.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   881
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   882
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   883
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   884
.B \f[CB]\-sectionsonly\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   885
If the \f[CB]\-sectionsonly\f[R] option appears on the command line, then
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   886
the \f[CB]\&.SF\f[R] file (signature file) generated when a JAR file is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   887
signed doesn\[aq]t include a header that contains a hash of the whole
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   888
manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   889
It contains only the information and hashes related to each individual
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   890
source file included in the JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   891
See Signature File.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   892
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   893
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   894
By default, this header is added, as an optimization.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   895
When the header is present, whenever the JAR file is verified, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   896
verification can first check to see whether the hash in the header
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   897
matches the hash of the whole manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   898
When there is a match, verification proceeds to the next step.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   899
When there is no match, it is necessary to do a less optimized
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   900
verification that the hash in each source file information section in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   901
the \f[CB]\&.SF\f[R] file equals the hash of its corresponding section in
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   902
the manifest file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   903
See \f[B]JAR File Verification\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   904
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   905
The \f[CB]\-sectionsonly\f[R] option is primarily used for testing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   906
It shouldn\[aq]t be used other than for testing because using it incurs
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   907
higher overhead.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   908
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   909
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   910
.B \f[CB]\-protected\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   911
Values can be either \f[CB]true\f[R] or \f[CB]false\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   912
Specify \f[CB]true\f[R] when a password must be specified through a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   913
protected authentication path such as a dedicated PIN reader.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   914
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   915
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   916
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   917
.B \f[CB]\-providerName\f[R] \f[I]providerName\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   918
If more than one provider was configured in the \f[CB]java.security\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   919
security properties file, then you can use the \f[CB]\-providerName\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   920
option to target a specific provider instance.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   921
The argument to this option is the name of the provider.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   922
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   923
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   924
For the Oracle PKCS #11 provider, \f[I]providerName\f[R] is of the form
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   925
\f[CB]SunPKCS11\-\f[R]\f[I]TokenName\f[R], where \f[I]TokenName\f[R] is the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   926
name suffix that the provider instance has been configured with, as
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   927
detailed in the configuration attributes table.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   928
For example, the following command lists the contents of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   929
\f[CB]PKCS\ #11\f[R] keystore provider instance with name suffix
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   930
\f[CB]SmartCard\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   931
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   932
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   933
\f[CB]jarsigner\ \-keystore\ NONE\ \-storetype\ PKCS11\ \-providerName\ SunPKCS11\-SmartCard\ \-list\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   934
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   935
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   936
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   937
.B \f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerArg\f[R] \f[I]arg\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   938
Adds a security provider by name (such as SunPKCS11) and an optional
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   939
configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   940
The value of the security provider is the name of a security provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   941
that is defined in a module.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   942
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   943
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   944
Used with the \f[CB]\-providerArg\ ConfigFilePath\f[R] option, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   945
\f[CB]keytool\f[R] and \f[CB]jarsigner\f[R] tools install the provider
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   946
dynamically and use \f[CB]ConfigFilePath\f[R] for the path to the token
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   947
configuration file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   948
The following example shows a command to list a \f[CB]PKCS\ #11\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   949
keystore when the Oracle PKCS #11 provider wasn\[aq]t configured in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   950
security properties file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   951
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   952
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   953
\f[CB]jarsigner\ \-keystore\ NONE\ \-storetype\ PKCS11\ \-addprovider\ SunPKCS11\ \-providerArg\ /mydir1/mydir2/token.config\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   954
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   955
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   956
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   957
.B \f[CB]\-providerClass\f[R] \f[I]provider\-class\-name\f[R] [\f[CB]\-providerArg\f[R] \f[I]arg\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   958
Used to specify the name of cryptographic service provider\[aq]s master
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   959
class file when the service provider isn\[aq]t listed in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   960
\f[CB]java.security\f[R] security properties file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   961
Adds a security provider by fully\-qualified class name and an optional
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   962
configure argument.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   963
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   964
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   965
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   966
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   967
The preferred way to load PKCS11 is by using modules.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   968
See \f[CB]\-addprovider\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   969
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   970
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   971
.B \f[CB]\-J\f[R]\f[I]javaoption\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   972
Passes through the specified \f[I]javaoption\f[R] string directly to the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   973
Java interpreter.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   974
The \f[CB]jarsigner\f[R] command is a wrapper around the interpreter.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   975
This option shouldn\[aq]t contain any spaces.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   976
It is useful for adjusting the execution environment or memory usage.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   977
For a list of possible interpreter options, type \f[CB]java\ \-h\f[R] or
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   978
\f[CB]java\ \-X\f[R] at the command line.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   979
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   980
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   981
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   982
.B \f[CB]\-strict\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   983
During the signing or verifying process, the command may issue warning
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   984
messages.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   985
If you specify this option, the exit code of the tool reflects the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   986
severe warning messages that this command found.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   987
See \f[B]Errors and Warnings\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   988
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   989
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   990
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   991
.B \f[CB]\-conf\f[R] \f[I]url\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   992
Specifies a pre\-configured options file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   993
Read the \f[B]keytool documentation\f[R] for details.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   994
The property keys supported are "jarsigner.all" for all actions,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   995
"jarsigner.sign" for signing, and "jarsigner.verify" for verification.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   996
\f[CB]jarsigner\f[R] arguments including the JAR file name and alias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   997
name(s) cannot be set in this file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   998
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
   999
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1000
.SH DEPRECATED OPTIONS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1001
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1002
The following \f[CB]jarsigner\f[R] options are deprecated as of JDK 9 and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1003
might be removed in a future JDK release.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1004
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1005
.B \f[CB]\-altsigner\f[R] \f[I]class\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1006
This option specifies an alternative signing mechanism.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1007
The fully qualified class name identifies a class file that extends the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1008
\f[CB]com.sun.jarsigner.ContentSigner\f[R] abstract class.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1009
The path to this class file is defined by the \f[CB]\-altsignerpath\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1010
option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1011
If the \f[CB]\-altsigner\f[R] option is used, then the \f[CB]jarsigner\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1012
command uses the signing mechanism provided by the specified class.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1013
Otherwise, the \f[CB]jarsigner\f[R] command uses its default signing
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1014
mechanism.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1015
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1016
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1017
For example, to use the signing mechanism provided by a class named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1018
\f[CB]com.sun.sun.jarsigner.AuthSigner\f[R], use the \f[CB]jarsigner\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1019
option \f[CB]\-altsigner\ com.sun.jarsigner.AuthSigner\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1020
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1021
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1022
.B \f[CB]\-altsignerpath\f[R] \f[I]classpathlist\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1023
Specifies the path to the class file and any JAR file it depends on.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1024
The class file name is specified with the \f[CB]\-altsigner\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1025
If the class file is in a JAR file, then this option specifies the path
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1026
to that JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1027
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1028
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1029
An absolute path or a path relative to the current directory can be
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1030
specified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1031
If \f[I]classpathlist\f[R] contains multiple paths or JAR files, then
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1032
they should be separated with a:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1033
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1034
Colon (\f[CB]:\f[R]) on Oracle Solaris, Linux, and macOS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1035
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1036
Semicolon (\f[CB];\f[R]) on Windows
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1037
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1038
This option isn\[aq]t necessary when the class is already in the search
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1039
path.
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
The following example shows how to specify the path to a JAR file that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1042
contains the class file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1043
The JAR file name is included.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1044
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1045
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1046
\f[CB]\-altsignerpath\ /home/user/lib/authsigner.jar\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1047
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1048
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1049
The following example shows how to specify the path to the JAR file that
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1050
contains the class file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1051
The JAR file name is omitted.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1052
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1053
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1054
\f[CB]\-altsignerpath\ /home/user/classes/com/sun/tools/jarsigner/\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1055
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1056
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1057
.SH ERRORS AND WARNINGS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1058
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1059
During the signing or verifying process, the \f[CB]jarsigner\f[R] command
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1060
may issue various errors or warnings.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1061
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1062
If there is a failure, the \f[CB]jarsigner\f[R] command exits with code 1.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1063
If there is no failure, but there are one or more severe warnings, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1064
\f[CB]jarsigner\f[R] command exits with code 0 when the \f[CB]\-strict\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1065
option is \f[B]not\f[R] specified, or exits with the OR\-value of the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1066
warning codes when the \f[CB]\-strict\f[R] is specified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1067
If there is only informational warnings or no warning at all, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1068
command always exits with code 0.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1069
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1070
For example, if a certificate used to sign an entry is expired and has a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1071
KeyUsage extension that doesn\[aq]t allow it to sign a file, the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1072
\f[CB]jarsigner\f[R] command exits with code 12 (=4+8) when the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1073
\f[CB]\-strict\f[R] option is specified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1074
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1075
\f[B]Note:\f[R] Exit codes are reused because only the values from 0 to
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1076
255 are legal on Oracle Solaris, Linux, and OS X.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1077
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1078
The following sections describes the names, codes, and descriptions of
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1079
the errors and warnings that the \f[CB]jarsigner\f[R] command can issue.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1080
.SH FAILURE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1081
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1082
Reasons why the \f[CB]jarsigner\f[R] command fails include (but aren\[aq]t
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1083
limited to) a command line parsing error, the inability to find a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1084
keypair to sign the JAR file, or the verification of a signed JAR fails.
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1085
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1086
.B failure
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1087
Code 1.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1088
The signing or verifying fails.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1089
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1090
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1091
.SH SEVERE WARNINGS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1092
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1093
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1094
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1095
Severe warnings are reported as errors if you specify the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1096
\f[CB]\-strict\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1097
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1098
Reasons why the \f[CB]jarsigner\f[R] command issues a severe warning
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1099
include the certificate used to sign the JAR file has an error or the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1100
signed JAR file has other problems.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1101
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1102
.B hasExpiredCert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1103
Code 4.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1104
This JAR contains entries whose signer certificate has expired.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1105
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1106
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1107
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1108
.B hasExpiredTsaCert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1109
Code 4.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1110
The timestamp has expired.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1111
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1112
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1113
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1114
.B notYetValidCert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1115
Code 4.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1116
This JAR contains entries whose signer certificate isn\[aq]t yet valid.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1117
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1118
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1119
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1120
.B chainNotValidated
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1121
Code 4.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1122
This JAR contains entries whose certificate chain isn\[aq]t validated.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1123
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1124
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1125
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1126
.B tsaChainNotValidated
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1127
Code 64.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1128
The timestamp is invalid.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1129
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1130
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1131
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1132
.B signerSelfSigned
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1133
Code 4.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1134
This JAR contains entries whose signer certificate is self signed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1135
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1136
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1137
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1138
.B weakAlg
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1139
Code 4.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1140
An algorithm specified on the command line is considered a security
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1141
risk.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1142
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1143
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1144
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1145
.B badKeyUsage
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1146
Code 8.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1147
This JAR contains entries whose signer certificate\[aq]s KeyUsage
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1148
extension doesn\[aq]t allow code signing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1149
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1150
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1151
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1152
.B badExtendedKeyUsage
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1153
Code 8.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1154
This JAR contains entries whose signer certificate\[aq]s
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1155
ExtendedKeyUsage extension doesn\[aq]t allow code signing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1156
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1157
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1158
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1159
.B badNetscapeCertType
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1160
Code 8.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1161
This JAR contains entries whose signer certificate\[aq]s
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1162
NetscapeCertType extension doesn\[aq]t allow code signing.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1163
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1164
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1165
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1166
.B hasUnsignedEntry
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1167
Code 16.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1168
This JAR contains unsigned entries which haven\[aq]t been
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1169
integrity\-checked.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1170
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1171
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1172
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1173
.B notSignedByAlias
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1174
Code 32.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1175
This JAR contains signed entries which aren\[aq]t signed by the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1176
specified alias(es).
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1177
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1178
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1179
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1180
.B aliasNotInStore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1181
Code 32.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1182
This JAR contains signed entries that aren\[aq]t signed by alias in this
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1183
keystore.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1184
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1185
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1186
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1187
.B tsaChainNotValidated
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1188
Code 64.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1189
This JAR contains entries whose TSA certificate chain is invalid.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1190
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1191
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1192
.SH INFORMATIONAL WARNINGS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1193
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1194
Informational warnings include those that aren\[aq]t errors but regarded
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1195
as bad practice.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1196
They don\[aq]t have a code.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1197
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1198
.B hasExpiringCert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1199
This JAR contains entries whose signer certificate expires within six
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1200
months.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1201
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1202
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1203
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1204
.B hasExpiringTsaCert
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1205
The timestamp will expire within one year on \f[CB]YYYY\-MM\-DD\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1206
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1207
.RE
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1208
.TP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1209
.B noTimestamp
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1210
This JAR contains signatures that doesn\[aq]t include a timestamp.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1211
Without a timestamp, users may not be able to validate this JAR file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1212
after the signer certificate\[aq]s expiration date
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1213
(\f[CB]YYYY\-MM\-DD\f[R]) or after any future revocation date.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1214
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1215
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1216
.SH EXAMPLE OF SIGNING A JAR FILE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1217
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1218
Use the following command to sign \f[CB]bundle.jar\f[R] with the private
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1219
key of a user whose keystore alias is \f[CB]jane\f[R] in a keystore named
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1220
\f[CB]mystore\f[R] in the \f[CB]working\f[R] directory and name the signed
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1221
JAR file \f[CB]sbundle.jar\f[R]:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1222
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1223
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1224
\f[CB]jarsigner\ \-keystore\ /working/mystore\ \-storepass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1225
\f[I]keystore_password\f[R] \f[CB]\-keypass\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1226
\f[I]private_key_password\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1227
\f[CB]\-signedjar\ sbundle.jar\ bundle.jar\ jane\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1228
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1229
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1230
There is no \f[CB]\-sigfile\f[R] specified in the previous command so the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1231
generated \f[CB]\&.SF\f[R] and \f[CB]\&.DSA\f[R] files to be placed in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1232
signed JAR file have default names based on the alias name.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1233
They are named \f[CB]JANE.SF\f[R] and \f[CB]JANE.DSA\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1234
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1235
If you want to be prompted for the store password and the private key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1236
password, then you could shorten the previous command to the following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1237
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1238
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1239
\f[CB]jarsigner\ \-keystore\ /working/mystore\ \-signedjar\ sbundle.jar\ bundle.jar\ jane\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1240
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1241
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1242
If the \f[CB]keystore\f[R] is the default \f[CB]keystore\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1243
(\f[CB]\&.keystore\f[R] in your home directory), then you don\[aq]t need
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1244
to specify a \f[CB]keystore\f[R], as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1245
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1246
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1247
\f[CB]jarsigner\ \-signedjar\ sbundle.jar\ bundle.jar\ jane\f[R]
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
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1250
If you want the signed JAR file to overwrite the input JAR file
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1251
(\f[CB]bundle.jar\f[R]), then you don\[aq]t need to specify a
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1252
\f[CB]\-signedjar\f[R] option, as follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1253
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1254
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1255
\f[CB]jarsigner\ bundle.jar\ jane\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1256
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1257
.SH EXAMPLE OF VERIFYING A SIGNED JAR FILE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1258
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1259
To verify a signed JAR file to ensure that the signature is valid and
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1260
the JAR file wasn\[aq]t been tampered with, use a command such as the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1261
following:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1262
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1263
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1264
\f[CB]jarsigner\ \-verify\ ButtonDemo.jar\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1265
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1266
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1267
When the verification is successful, \f[CB]jar\ verified\f[R] is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1268
displayed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1269
Otherwise, an error message is displayed.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1270
You can get more information when you use the \f[CB]\-verbose\f[R] option.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1271
A sample use of \f[CB]jarsigner\f[R] with the \f[CB]\-verbose\f[R] option
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1272
follows:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1273
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1274
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1275
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1276
jarsigner\ \-verify\ \-verbose\ ButtonDemo.jar
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
  1277
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1278
s\ \ \ \ \ \ \ 866\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/MANIFEST.MF
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1279
\ \ \ \ \ \ \ \ 825\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.SF
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1280
\ \ \ \ \ \ \ 7475\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.RSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1281
\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:54\ EDT\ 2017\ META\-INF/
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1282
\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1283
\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1284
sm\ \ \ \ \ \ 523\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo$1.class
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1285
sm\ \ \ \ \ 3440\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.class
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1286
sm\ \ \ \ \ 2346\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.jnlp
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1287
sm\ \ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/left.gif
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1288
sm\ \ \ \ \ \ 235\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/middle.gif
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1289
sm\ \ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/right.gif
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1290
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1291
\ \ s\ =\ signature\ was\ verified
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1292
\ \ m\ =\ entry\ is\ listed\ in\ manifest
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1293
\ \ k\ =\ at\ least\ one\ certificate\ was\ found\ in\ keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1294
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1295
\-\ Signed\ by\ "CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US"
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1296
\ \ \ \ Digest\ algorithm:\ SHA\-256
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1297
\ \ \ \ Signature\ algorithm:\ SHA256withRSA,\ 2048\-bit\ key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1298
\ \ Timestamped\ by\ "CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US"\ on\ Tue\ Sep\ 12\ 20:08:49\ UTC\ 2017
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1299
\ \ \ \ Timestamp\ digest\ algorithm:\ SHA\-1
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1300
\ \ \ \ Timestamp\ signature\ algorithm:\ SHA1withRSA,\ 2048\-bit\ key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1301
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1302
jar\ verified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1303
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1304
The\ signer\ certificate\ expired\ on\ 2018\-02\-01.\ However,\ the\ JAR\ will\ be\ valid\ until\ the\ timestamp\ expires\ on\ 2020\-12\-29.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1305
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1306
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1307
.SH EXAMPLE OF VERIFICATION WITH CERTIFICATE INFORMATION
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
  1308
.PP
55140
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1309
If you specify the \f[CB]\-certs\f[R] option with the \f[CB]\-verify\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1310
and \f[CB]\-verbose\f[R] options, then the output includes certificate
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1311
information for each signer of the JAR file.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1312
The information includes the certificate type, the signer distinguished
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1313
name information (when it is an X.509 certificate), and in parentheses,
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1314
the keystore alias for the signer when the public key certificate in the
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1315
JAR file matches the one in a keystore entry, for example:
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1316
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1317
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1318
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1319
jarsigner\ \-keystore\ $JAVA_HOME/lib/security/cacerts\ \-verify\ \-verbose\ \-certs\ ButtonDemo.jar
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1320
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1321
s\ k\ \ \ \ \ 866\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/MANIFEST.MF
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1322
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1323
\ \ \ \ \ \ >>>\ Signer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1324
\ \ \ \ \ \ X.509,\ CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1325
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2017\-01\-30,\ 7:00\ PM\ to\ 2018\-02\-01,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1326
\ \ \ \ \ \ X.509,\ CN=Symantec\ Class\ 3\ SHA256\ Code\ Signing\ CA,\ OU=Symantec\ Trust\ Network,\ O=Symantec\ Corporation,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1327
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2013\-12\-09,\ 7:00\ PM\ to\ 2023\-12\-09,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1328
\ \ \ \ \ \ X.509,\ CN=VeriSign\ Class\ 3\ Public\ Primary\ Certification\ Authority\ \-\ G5,\ OU="(c)\ 2006\ VeriSign,\ Inc.\ \-\ For\ authorized\ use\ only",\ OU=VeriSign\ Trust\ Network,\ O="VeriSign,\ Inc.",\ C=US\ (verisignclass3g5ca\ [jdk])
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1329
\ \ \ \ \ \ [trusted\ certificate]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1330
\ \ \ \ \ \ >>>\ TSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1331
\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1332
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-10\-17,\ 8:00\ PM\ to\ 2020\-12\-29,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1333
\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ CA\ \-\ G2,\ O=Symantec\ Corporation,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1334
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-12\-20,\ 7:00\ PM\ to\ 2020\-12\-30,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1335
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1336
\ \ \ \ \ \ \ \ 825\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.SF
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1337
\ \ \ \ \ \ \ 7475\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.RSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1338
\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:54\ EDT\ 2017\ META\-INF/
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1339
\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1340
\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1341
smk\ \ \ \ \ 523\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo$1.class
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1342
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1343
\ \ \ \ \ \ [entry\ was\ signed\ on\ 2017\-09\-12,\ 4:08\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1344
\ \ \ \ \ \ >>>\ Signer
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1345
\ \ \ \ \ \ X.509,\ CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1346
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2017\-01\-30,\ 7:00\ PM\ to\ 2018\-02\-01,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1347
\ \ \ \ \ \ X.509,\ CN=Symantec\ Class\ 3\ SHA256\ Code\ Signing\ CA,\ OU=Symantec\ Trust\ Network,\ O=Symantec\ Corporation,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1348
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2013\-12\-09,\ 7:00\ PM\ to\ 2023\-12\-09,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1349
\ \ \ \ \ \ X.509,\ CN=VeriSign\ Class\ 3\ Public\ Primary\ Certification\ Authority\ \-\ G5,\ OU="(c)\ 2006\ VeriSign,\ Inc.\ \-\ For\ authorized\ use\ only",\ OU=VeriSign\ Trust\ Network,\ O="VeriSign,\ Inc.",\ C=US\ (verisignclass3g5ca\ [jdk])
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1350
\ \ \ \ \ \ [trusted\ certificate]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1351
\ \ \ \ \ \ >>>\ TSA
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1352
\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1353
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-10\-17,\ 8:00\ PM\ to\ 2020\-12\-29,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1354
\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ CA\ \-\ G2,\ O=Symantec\ Corporation,\ C=US
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1355
\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-12\-20,\ 7:00\ PM\ to\ 2020\-12\-30,\ 6:59\ PM]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1356
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1357
smk\ \ \ \ 3440\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.class
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1358
\&...
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1359
smk\ \ \ \ 2346\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.jnlp
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1360
\&...
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1361
smk\ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/left.gif
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1362
\&...
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1363
smk\ \ \ \ \ 235\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/middle.gif
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1364
\&...
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1365
smk\ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/right.gif
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1366
\&...
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1367
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1368
\ \ s\ =\ signature\ was\ verified
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1369
\ \ m\ =\ entry\ is\ listed\ in\ manifest
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1370
\ \ k\ =\ at\ least\ one\ certificate\ was\ found\ in\ keystore
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1371
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1372
\-\ Signed\ by\ "CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US"
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1373
\ \ \ \ Digest\ algorithm:\ SHA\-256
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1374
\ \ \ \ Signature\ algorithm:\ SHA256withRSA,\ 2048\-bit\ key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1375
\ \ Timestamped\ by\ "CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US"\ on\ Tue\ Sep\ 12\ 20:08:49\ UTC\ 2017
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1376
\ \ \ \ Timestamp\ digest\ algorithm:\ SHA\-1
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1377
\ \ \ \ Timestamp\ signature\ algorithm:\ SHA1withRSA,\ 2048\-bit\ key
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1378
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1379
jar\ verified.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1380
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1381
The\ signer\ certificate\ expired\ on\ 2018\-02\-01.\ However,\ the\ JAR\ will\ be\ valid\ until\ the\ timestamp\ expires\ on\ 2020\-12\-29.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1382
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1383
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1384
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1385
If the certificate for a signer isn\[aq]t an X.509 certificate, then
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1386
there is no distinguished name information.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1387
In that case, just the certificate type and the alias are shown.
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1388
For example, if the certificate is a PGP certificate, and the alias is
d4890c3721be 8225134: Update man-page files
jjg
parents: 52714
diff changeset
  1389
\f[CB]bob\f[R], then you would get: \f[CB]PGP,\ (bob)\f[R].