jdk/src/bsd/doc/man/jarsigner.1
author pgovereau
Mon, 13 Oct 2014 11:21:51 -0400
changeset 27120 8ed4ea81b048
parent 21743 3d979da7bdf0
child 31876 91b22707521a
permissions -rw-r--r--
8058243: Reduce size of bytecode for large switch statements Reviewed-by: jjg, vromero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     1
'\" t
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     2
.\"  Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     3
.\"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     4
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     5
.\"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     6
.\" This code is free software; you can redistribute it and/or modify it
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     7
.\" under the terms of the GNU General Public License version 2 only, as
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     8
.\" published by the Free Software Foundation.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
     9
.\"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    10
.\" This code is distributed in the hope that it will be useful, but WITHOUT
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    11
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    12
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    13
.\" version 2 for more details (a copy is included in the LICENSE file that
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    14
.\" accompanied this code).
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    15
.\"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    16
.\" You should have received a copy of the GNU General Public License version
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    17
.\" 2 along with this work; if not, write to the Free Software Foundation,
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    18
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    19
.\"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    20
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    21
.\" or visit www.oracle.com if you need additional information or have any
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    22
.\" questions.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    23
.\"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    24
.\"     Arch: generic
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    25
.\"     Software: JDK 8
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    26
.\"     Date: 21 November 2013
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    27
.\"     SectDesc: Security Tools
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    28
.\"     Title: jarsigner.1
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    29
.\"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    30
.if n .pl 99999
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    31
.TH jarsigner 1 "21 November 2013" "JDK 8" "Security Tools"
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    32
.\" -----------------------------------------------------------------
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    33
.\" * Define some portability stuff
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    34
.\" -----------------------------------------------------------------
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    35
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    36
.\" http://bugs.debian.org/507673
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    37
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    38
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    39
.ie \n(.g .ds Aq \(aq
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    40
.el       .ds Aq '
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    41
.\" -----------------------------------------------------------------
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    42
.\" * set default formatting
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    43
.\" -----------------------------------------------------------------
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    44
.\" disable hyphenation
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    45
.nh
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    46
.\" disable justification (adjust text to left margin only)
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    47
.ad l
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    48
.\" -----------------------------------------------------------------
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    49
.\" * MAIN CONTENT STARTS HERE *
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    50
.\" -----------------------------------------------------------------
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
    51
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    52
.SH NAME    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    53
jarsigner \- Signs and verifies Java Archive (JAR) files\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    54
.SH SYNOPSIS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    55
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    56
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    57
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    58
\fBjarsigner\fR [ \fIoptions\fR ] \fIjar\-file\fR \fIalias\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    59
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    60
.nf     
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
    61
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    62
\fBjarsigner\fR \fB\-verify\fR [ \fIoptions\fR ] \fIjar\-file\fR [\fIalias \&.\&.\&.\fR]
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    63
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    64
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    65
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    66
\fIoptions\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    67
The command-line options\&. See Options\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    68
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    69
-verify
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    70
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    71
The \f3-verify\fR option can take zero or more keystore alias names after the JAR file name\&. When the \f3-verify\fR option is specified, the \f3jarsigner\fR command checks that the certificate used to verify each signed entry in the JAR file matches one of the keystore aliases\&. The aliases are defined in the keystore specified by \f3-keystore\fR or the default keystore\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
    72
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    73
If you also specified the \f3-strict\fR option, and the \f3jarsigner\fR command detected severe warnings, the message, "jar verified, with signer errors" is displayed\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    74
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    75
\fIjar-file\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    76
The JAR file to be signed\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
    77
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    78
If you also specified the \f3-strict\fR option, and the \f3jarsigner\fR command detected severe warnings, the message, "jar signed, with signer errors" is displayed\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    79
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    80
\fIalias\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    81
The aliases are defined in the keystore specified by \f3-keystore\fR or the default keystore\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    82
.SH DESCRIPTION    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    83
The \f3jarsigner\fR tool has two purposes:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    84
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    85
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    86
To sign Java Archive (JAR) files\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    87
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    88
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    89
To verify the signatures and integrity of signed JAR files\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    90
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    91
The JAR feature enables the packaging of class files, images, sounds, and other digital data in a single file for faster and easier distribution\&. A tool named \f3jar\fR enables developers to produce JAR files\&. (Technically, any zip file can also be considered a JAR file, although when created by the \f3jar\fR command or processed by the \f3jarsigner\fR command, JAR files also contain a \f3META-INF/MANIFEST\&.MF\fR file\&.)
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    92
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    93
A digital signature is a string of bits that is computed from some data (the data being signed) and the private key of an entity (a person, company, and so on)\&. Similar to a handwritten signature, a digital signature has many useful characteristics:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    94
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    95
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    96
Its authenticity can be verified by a computation that uses the public key corresponding to the private key used to generate the signature\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    97
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    98
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
    99
It cannot be forged, assuming the private key is kept secret\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   100
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   101
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   102
It is a function of the data signed and thus cannot be claimed to be the signature for other data as well\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   103
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   104
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   105
The signed data cannot be changed\&. If the data is changed, then the signature cannot be verified as authentic\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   106
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   107
To generate an entity\&'s signature for a file, the entity must first have a public/private key pair associated with it and one or more certificates that authenticate its public key\&. A certificate is a digitally signed statement from one entity that says that the public key of another entity has a particular value\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   108
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   109
The \f3jarsigner\fR command uses key and certificate information from a keystore to generate digital signatures for JAR files\&. A keystore is a database of private keys and their associated X\&.509 certificate chains that authenticate the corresponding public keys\&. The \f3keytool\fR command is used to create and administer keystores\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   110
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   111
The \f3jarsigner\fR command uses an entity\&'s private key to generate a signature\&. The signed JAR file contains, among other things, a copy of the certificate from the keystore for the public key corresponding to the private key used to sign the file\&. The \f3jarsigner\fR command can verify the digital signature of the signed JAR file using the certificate inside it (in its signature block file)\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   112
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   113
The \f3jarsigner\fR command can generate signatures that include a time stamp that lets a systems or deployer (including Java Plug-in) to check whether the JAR file was signed while the signing certificate was still valid\&. In addition, APIs allow applications to obtain the timestamp information\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   114
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   115
At this time, the \f3jarsigner\fR command can only sign JAR files created by the \f3jar\fR command or zip files\&. JAR files are the same as zip files, except they also have a \f3META-INF/MANIFEST\&.MF\fR file\&. A \f3META-INF/MANIFEST\&.MF\fR file is created when the \f3jarsigner\fR command signs a zip file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   116
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   117
The default \f3jarsigner\fR command behavior is to sign a JAR or zip file\&. Use the \f3-verify\fR option to verify a signed JAR file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   118
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   119
The \f3jarsigner\fR command also attempts to validate the signer\&'s certificate after signing or verifying\&. If there is a validation error or any other problem, the command generates warning messages\&. If you specify the \f3-strict\fR option, then the command treats severe warnings as errors\&. See Errors and Warnings\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   120
.SS KEYSTORE\ ALIASES    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   121
All keystore entities are accessed with unique aliases\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   122
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   123
When you use the \f3jarsigner\fR command to sign a JAR file, you must specify the alias for the keystore entry that contains the private key needed to generate the signature\&. For example, the following command signs the JAR file named \f3MyJARFile\&.jar\fR with the private key associated with the alias \f3duke\fR in the keystore named \f3mystore\fR in the \f3working\fR directory\&. Because no output file is specified, it overwrites \f3MyJARFile\&.jar\fR with the signed JAR file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   124
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   125
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   126
\f3jarsigner \-keystore /working/mystore \-storepass <keystore password>\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   127
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   128
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   129
\f3      \-keypass <private key password> MyJARFile\&.jar duke\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   130
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   131
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   132
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   133
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   134
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   135
Keystores are protected with a password, so the store password must be specified\&. You are prompted for it when you do not specify it on the command line\&. Similarly, private keys are protected in a keystore with a password, so the private key\&'s password must be specified, and you are prompted for the password when you do not specify it on the command line and it is not the same as the store password\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   136
.SS KEYSTORE\ LOCATION    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   137
The \f3jarsigner\fR command has a \f3-keystore\fR option for specifying the URL of the keystore to be used\&. The keystore is by default stored in a file named \f3\&.keystore\fR in the user\&'s home directory, as determined by the \f3user\&.home\fR system property\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   138
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   139
On Oracle Solaris systems, \f3user\&.home\fR defaults to the user\&'s home directory\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   140
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   141
The input stream from the \f3-keystore\fR option is passed to the \f3KeyStore\&.load\fR method\&. If \f3NONE\fR is specified as the URL, then a null stream is passed to the \f3KeyStore\&.load\fR method\&. \f3NONE\fR should be specified when the \f3KeyStore\fR class is not file based, for example, when it resides on a hardware token device\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   142
.SS KEYSTORE\ IMPLEMENTATION    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   143
The \f3KeyStore\fR class provided in the \f3java\&.security\fR package supplies a number of well-defined interfaces to access and modify the information in a keystore\&. You can have multiple different concrete implementations, where each implementation is for a particular type of keystore\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   144
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   145
Currently, there are two command-line tools that use keystore implementations (\f3keytool\fR and \f3jarsigner\fR), and a GUI-based tool named Policy Tool\&. Because the \f3KeyStore\fR class is publicly available, JDK users can write additional security applications that use it\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   146
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   147
There is a built-in default implementation provided by Oracle that implements the keystore as a file, that uses a proprietary keystore type (format) named JKS\&. The built-in implementation protects each private key with its individual password and protects the integrity of the entire keystore with a (possibly different) password\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   148
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   149
Keystore implementations are provider-based, which means the application interfaces supplied by the \f3KeyStore\fR class are implemented in terms of a Service Provider Interface (SPI)\&. There is a corresponding abstract \f3KeystoreSpi\fR class, also in the \f3java\&.security package\fR, that defines the Service Provider Interface methods that providers must implement\&. The term provider refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API\&. To provide a keystore implementation, clients must implement a provider and supply a \f3KeystoreSpi\fR subclass implementation, as described in How to Implement a Provider in the Java Cryptography Architecture at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/crypto/HowToImplAProvider\&.html
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   150
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   151
Applications can choose different types of keystore implementations from different providers, with the \f3getInstance\fR factory method in the \f3KeyStore\fR class\&. A keystore type defines the storage and data format of the keystore information and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself\&. Keystore implementations of different types are not compatible\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   152
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   153
The \f3jarsigner\fR and \f3policytool\fR commands can read file-based keystores from any location that can be specified using a URL\&. In addition, these commands can read non-file-based keystores such as those provided by MSCAPI on Windows and PKCS11 on all platforms\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   154
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   155
For the \f3jarsigner\fR and \f3keytool\fR commands, you can specify a keystore type at the command line with the \f3-storetype\fR option\&. For Policy Tool, you can specify a keystore type with the \fIEdit\fR command in the \fIKeyStore\fR menu\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   156
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   157
If you do not explicitly specify a keystore type, then the tools choose a keystore implementation based on the value of the \f3keystore\&.type\fR property specified in the security properties file\&. The security properties file is called \f3java\&.security\fR, and it resides in the JDK security properties directory, \f3java\&.home/lib/security\fR, where \f3java\&.home\fR is the runtime environment\&'s directory\&. The \f3jre\fR directory in the JDK or the top-level directory of the Java Runtime Environment (JRE)\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   158
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   159
Each tool gets the \f3keystore\&.type\fR value and then examines all the installed providers until it finds one that implements keystores of that type\&. It then uses the keystore implementation from that provider\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   160
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   161
The \f3KeyStore\fR class defines a static method named \f3getDefaultType\fR that lets applications and applets retrieve the value of the \f3keystore\&.type\fR property\&. The following line of code creates an instance of the default keystore type as specified in the \f3keystore\&.type property\fR:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   162
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   163
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   164
\f3KeyStore keyStore = KeyStore\&.getInstance(KeyStore\&.getDefaultType());\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   165
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   166
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   167
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   168
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   169
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   170
The default keystore type is \f3jks\fR (the proprietary type of the keystore implementation provided by Oracle)\&. This is specified by the following line in the security properties file:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   171
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   172
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   173
\f3keystore\&.type=jks\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   174
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   175
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   176
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   177
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   178
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   179
Case does not matter in keystore type designations\&. For example, \f3JKS\fR is the same as \f3jks\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   180
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   181
To have the tools use a keystore implementation other than the default, change that line to specify a different keystore type\&. For example, if you have a provider package that supplies a keystore implementation for a keystore type called \f3pkcs12\fR, then change the line to the following:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   182
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   183
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   184
\f3keystore\&.type=pkcs12\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   185
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   186
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   187
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   188
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   189
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   190
\fINote:\fR If you use the PKCS 11 provider package, then see "KeyTool" and "JarSigner" in Java PKCS #11 Reference Guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/p11guide\&.html
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   191
.SS SUPPORTED\ ALGORITHMS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   192
By default, the \f3jarsigner\fR command signs a JAR file using one of the following algorithms:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   193
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   194
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   195
Digital Signature Algorithm (DSA) with the SHA1 digest algorithm
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   196
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   197
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   198
RSA algorithm with the SHA256 digest algorithm
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   199
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   200
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   201
Elliptic Curve (EC) cryptography algorithm with the SHA256 with Elliptic Curve Digital Signature Algorithm (ECDSA)\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   202
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   203
If the signer\&'s public and private keys are DSA keys, then \f3jarsigner\fR signs the JAR file with the \f3SHA1withDSA\fR algorithm\&. If the signer\&'s keys are RSA keys, then \f3jarsigner\fR attempts to sign the JAR file with the \f3SHA256withRSA\fR algorithm\&. If the signer\&'s keys are EC keys, then \f3jarsigner\fR signs the JAR file with the \f3SHA256withECDSA\fR algorithm\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   204
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   205
These default signature algorithms can be overridden using the \f3-sigalg\fR option\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   206
.SS THE\ SIGNED\ JAR\ FILE    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   207
When the \f3jarsigner\fR command is used to sign a JAR file, the output signed JAR file is exactly the same as the input JAR file, except that it has two additional files placed in the META-INF directory:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   208
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   209
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   210
A signature file with an \f3\&.SF\fR extension
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   211
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   212
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   213
A signature block file with a \f3\&.DSA\fR, \f3\&.RSA\fR, or \f3\&.EC\fR extension
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   214
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   215
The base file names for these two files come from the value of the \f3-sigFile\fR option\&. For example, when the option is \f3-sigFile MKSIGN\fR, the files are named \f3MKSIGN\&.SF\fR and \f3MKSIGN\&.DSA\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   216
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   217
If no \f3-sigfile\fR option appears on the command line, then the base file name for the \f3\&.SF\fR and \f3\&.DSA\fR files is the first 8 characters of the alias name specified on the command line, all converted to uppercase\&. If the alias name has fewer than 8 characters, then the full alias name is used\&. If the alias name contains any characters that are not allowed in a signature file name, then each such character is converted to an underscore (_) character in forming the file name\&. Valid characters include letters, digits, underscores, and hyphens\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   218
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   219
Signature File
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   220
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   221
A signature file (\f3\&.SF\fR file) looks similar to the manifest file that is always included in a JAR file when the \f3jarsigner\fR command is used to sign the file\&. For each source file included in the JAR file, the \f3\&.SF\fR file has three lines, such as in the manifest file, that list the following:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   222
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   223
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   224
File name
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   225
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   226
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   227
Name of the digest algorithm (SHA)
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   228
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   229
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   230
SHA digest value
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   231
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   232
In the manifest file, the SHA digest value for each source file is the digest (hash) of the binary data in the source file\&. In the \f3\&.SF\fR file, the digest value for a specified source file is the hash of the three lines in the manifest file for the source file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   233
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   234
The signature file, by default, includes a header with a hash of the whole manifest file\&. The header also contains a hash of the manifest header\&. The presence of the header enables verification optimization\&. See JAR File Verification\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   235
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   236
Signature Block File
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   237
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   238
The \f3\&.SF\fR file is signed and the signature is placed in the signature block file\&. This file also contains, encoded inside it, the certificate or certificate chain from the keystore that authenticates the public key corresponding to the private key used for signing\&. The file has the extension \f3\&.DSA\fR, \f3\&.RSA\fR, or \f3\&.EC\fR, depending on the digest algorithm used\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   239
.SS SIGNATURE\ TIME\ STAMP    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   240
The \f3jarsigner\fR command can generate and store a signature time stamp when signing a JAR file\&. In addition, \f3jarsigner\fR supports alternative signing mechanisms\&. This behavior is optional and is controlled by the user at the time of signing through these options\&. See Options\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   241
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   242
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   243
\f3\-tsa \fIurl\fR\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   244
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   245
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   246
\f3\-tsacert \fIalias\fR\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   247
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   248
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   249
\f3\-altsigner \fIclass\fR\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   250
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   251
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   252
\f3\-altsignerpath \fIclasspathlist\fR\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   253
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   254
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   255
\f3\-tsapolicyid \fIpolicyid\fR\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   256
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   257
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   258
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   259
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   260
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   261
.SS JAR\ FILE\ VERIFICATION    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   262
A successful JAR file verification occurs when the signatures are valid, and none of the files that were in the JAR file when the signatures were generated have changed since then\&. JAR file verification involves the following steps:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   263
.TP 0.4i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   264
1\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   265
Verify the signature of the \f3\&.SF\fR file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   266
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   267
The verification ensures that the signature stored in each signature block (\f3\&.DSA\fR) file was generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the \f3\&.DSA\fR file\&. It also ensures that the signature is a valid signature of the corresponding signature (\f3\&.SF\fR) file, and thus the \f3\&.SF\fR file was not tampered with\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   268
.TP 0.4i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   269
2\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   270
Verify the digest listed in each entry in the \f3\&.SF\fR file with each corresponding section in the manifest\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   271
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   272
The \f3\&.SF\fR file by default includes a header that contains a hash of the entire manifest file\&. When the header is present, the verification can check to see whether or not the hash in the header matches the hash of the manifest file\&. If there is a match, then verification proceeds to the next step\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   273
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   274
If there is no match, then a less optimized verification is required to ensure that the hash in each source file information section in the \f3\&.SF\fR file equals the hash of its corresponding section in the manifest file\&. See Signature File\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   275
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   276
One reason the hash of the manifest file that is stored in the \f3\&.SF\fR file header might not equal the hash of the current manifest file is that one or more files were added to the JAR file (with the \f3jar\fR tool) after the signature and \f3\&.SF\fR file were generated\&. When the \f3jar\fR tool is used to add files, the manifest file is changed by adding sections to it for the new files, but the \f3\&.SF\fR file is not changed\&. A verification is still considered successful when none of the files that were in the JAR file when the signature was generated have been changed since then\&. This happens when the hashes in the non-header sections of the \f3\&.SF\fR file equal the hashes of the corresponding sections in the manifest file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   277
.TP 0.4i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   278
3\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   279
Read each file in the JAR file that has an entry in the \f3\&.SF\fR file\&. While reading, compute the file\&'s digest and compare the result with the digest for this file in the manifest section\&. The digests should be the same or verification fails\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   280
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   281
If any serious verification failures occur during the verification process, then the process is stopped and a security exception is thrown\&. The \f3jarsigner\fR command catches and displays the exception\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   282
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   283
\fINote:\fR You should read any addition warnings (or errors if you specified the \f3-strict\fR option), as well as the content of the certificate (by specifying the \f3-verbose\fR and \f3-certs\fR options) to determine if the signature can be trusted\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   284
.SS MULTIPLE\ SIGNATURES\ FOR\ A\ JAR\ FILE    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   285
A JAR file can be signed by multiple people by running the \f3jarsigner\fR command on the file multiple times and specifying the alias for a different person each time, as follows:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   286
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   287
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   288
\f3jarsigner myBundle\&.jar susan\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   289
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   290
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   291
\f3jarsigner myBundle\&.jar kevin\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   292
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   293
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   294
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   295
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   296
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   297
When a JAR file is signed multiple times, there are multiple \f3\&.SF\fR and \f3\&.DSA\fR files in the resulting JAR file, one pair for each signature\&. In the previous example, the output JAR file includes files with the following names:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   298
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   299
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   300
\f3SUSAN\&.SF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   301
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   302
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   303
\f3SUSAN\&.DSA\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   304
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   305
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   306
\f3KEVIN\&.SF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   307
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   308
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   309
\f3KEVIN\&.DSA\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   310
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   311
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   312
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   313
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   314
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   315
\fINote:\fR It is also possible for a JAR file to have mixed signatures, some generated by the JDK 1\&.1 by the \f3javakey\fR command and others by \f3jarsigner\fR\&. The \f3jarsigner\fR command can be used to sign JAR files that are already signed with the \f3javakey\fR command\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   316
.SH OPTIONS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   317
The following sections describe the various \f3jarsigner\fR options\&. Be aware of the following standards:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   318
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   319
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   320
All option names are preceded by a minus sign (-)\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   321
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   322
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   323
The options can be provided in any order\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   324
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   325
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   326
Items that are in italics or underlined (option values) represent the actual values that must be supplied\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   327
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   328
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   329
The \f3-storepass\fR, \f3-keypass\fR, \f3-sigfile\fR, \f3-sigalg\fR, \f3-digestalg\fR, \f3-signedjar\fR, and TSA-related options are only relevant when signing a JAR file; they are not relevant when verifying a signed JAR file\&. The \f3-keystore\fR option is relevant for signing and verifying a JAR file\&. In addition, aliases are specified when signing and verifying a JAR file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   330
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   331
-keystore \fIurl\fR
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   332
.br
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   333
Specifies the URL that tells the keystore location\&. This defaults to the file \f3\&.keystore\fR in the user\&'s home directory, as determined by the \f3user\&.home\fR system property\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   334
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   335
A keystore is required when signing\&. You must explicitly specify a keystore when the default keystore does not exist or if you want to use one other than the default\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   336
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   337
A keystore is not required when verifying, but if one is specified or the default exists and the \f3-verbose\fR option was also specified, then additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   338
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   339
The \f3-keystore\fR argument can be a file name and path specification rather than a URL, in which case it is treated the same as a file: URL, for example, the following are equivalent:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   340
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   341
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   342
\f3\-keystore \fIfilePathAndName\fR\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   343
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   344
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   345
\f3\-keystore file:\fIfilePathAndName\fR\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   346
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   347
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   348
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   349
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   350
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   351
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   352
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   353
If the Sun PKCS #11 provider was configured in the \f3java\&.security\fR security properties file (located in the JRE\&'s \f3$JAVA_HOME/lib/security directory\fR), then the \f3keytool\fR and \f3jarsigner\fR tools can operate on the PKCS #11 token by specifying these options:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   354
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   355
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   356
\f3\-keystore NONE\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   357
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   358
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   359
\f3\-storetype PKCS11\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   360
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   361
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   362
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   363
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   364
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   365
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   366
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   367
For example, the following command lists the contents of the configured PKCS#11 token:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   368
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   369
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   370
\f3keytool \-keystore NONE \-storetype PKCS11 \-list\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   371
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   372
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   373
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   374
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   375
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   376
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   377
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   378
-storetype \fIstoretype\fR
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   379
.br
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   380
Specifies the type of keystore to be instantiated\&. The default keystore type is the one that is specified as the value of the \f3keystore\&.type\fR property in the security properties file, which is returned by the static \f3getDefaultType\fR method in \f3java\&.security\&.KeyStore\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   381
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   382
The PIN for a PCKS #11 token can also be specified with the \f3-storepass\fR option\&. If none is specified, then the \f3keytool\fR and \f3jarsigner\fR commands prompt for the token PIN\&. If the token has a protected authentication path (such as a dedicated PIN-pad or a biometric reader), then the \f3-protected\fR option must be specified and no password options can be specified\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   383
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   384
-storepass[:env | :file] \fIargument\fR
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   385
.br
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   386
Specifies the password that is required to access the keystore\&. This is only needed when signing (not verifying) a JAR file\&. In that case, if a \f3-storepass\fR option is not provided at the command line, then the user is prompted for the password\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   387
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   388
If the modifier \f3env\fR or \f3file\fR is not specified, then the password has the value \fIargument\fR\&. Otherwise, the password is retrieved as follows:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   389
.RS     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   390
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   391
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   392
\f3env\fR: Retrieve the password from the environment variable named \f3argument\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   393
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   394
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   395
\f3file\fR: Retrieve the password from the file named \f3argument\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   396
.RE     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   397
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   398
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   399
\fINote:\fR The password should not be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   400
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   401
-keypass [:env | :file] \fIargument\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   402
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   403
Specifies the password used to protect the private key of the keystore entry addressed by the alias specified on the command line\&. The password is required when using \f3jarsigner\fR to sign a JAR file\&. If no password is provided on the command line, and the required password is different from the store password, then the user is prompted for it\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   404
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   405
If the modifier \f3env\fR or \f3file\fR is not specified, then the password has the value \f3argument\fR\&. Otherwise, the password is retrieved as follows:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   406
.RS     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   407
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   408
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   409
\f3env\fR: Retrieve the password from the environment variable named \f3argument\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   410
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   411
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   412
\f3file\fR: Retrieve the password from the file named \f3argument\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   413
.RE     
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   414
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   415
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   416
\fINote:\fR The password should not be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   417
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   418
-sigfile \fIfile\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   419
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   420
Specifies the base file name to be used for the generated \f3\&.SF\fR and \f3\&.DSA\fR files\&. For example, if file is \f3DUKESIGN\fR, then the generated \f3\&.SF\fR and \f3\&.DSA\fR files are named \f3DUKESIGN\&.SF\fR and \f3DUKESIGN\&.DSA\fR, and placed in the \f3META-INF\fR directory of the signed JAR file\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   421
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   422
The characters in the file must come from the set \f3a-zA-Z0-9_-\fR\&. Only letters, numbers, underscore, and hyphen characters are allowed\&. All lowercase characters are converted to uppercase for the \f3\&.SF\fR and \f3\&.DSA\fR file names\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   423
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   424
If no \f3-sigfile\fR option appears on the command line, then the base file name for the \f3\&.SF\fR and \f3\&.DSA\fR files is the first 8 characters of the alias name specified on the command line, all converted to upper case\&. If the alias name has fewer than 8 characters, then the full alias name is used\&. If the alias name contains any characters that are not valid in a signature file name, then each such character is converted to an underscore (_) character to form the file name\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   425
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   426
-sigalg \fIalgorithm\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   427
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   428
Specifies the name of the signature algorithm to use to sign the JAR file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   429
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   430
For a list of standard signature algorithm names, see "Appendix A: Standard Names" in the Java Cryptography Architecture (JCA) Reference Guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec\&.html#AppA
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   431
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   432
This algorithm must be compatible with the private key used to sign the JAR file\&. If this option is not specified, then \f3SHA1withDSA\fR, \f3SHA256withRSA\fR, or \f3SHA256withECDSA\fR are used depending on the type of private key\&. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f3-providerClass\fR option; otherwise, the command will not succeed\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   433
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   434
-digestalg \fIalgorithm\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   435
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   436
Specifies the name of the message digest algorithm to use when digesting the entries of a JAR file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   437
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   438
For a list of standard message digest algorithm names, see "Appendix A: Standard Names" in the Java Cryptography Architecture (JCA) Reference Guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec\&.html#AppA
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   439
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   440
If this option is not specified, then \f3SHA256\fR is used\&. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f3-providerClass\fR option; otherwise, the command will not succeed\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   441
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   442
-certs
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   443
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   444
If the \f3-certs\fR option appears on the command line with the \f3-verify\fR and \f3-verbose\fR options, then the output includes certificate information for each signer of the JAR file\&. This information includes the name of the type of certificate (stored in the \f3\&.DSA\fR file) that certifies the signer\&'s public key, and if the certificate is an X\&.509 certificate (an instance of the \f3java\&.security\&.cert\&.X509Certificate\fR), then the distinguished name of the signer\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   445
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   446
The keystore is also examined\&. If no keystore value is specified on the command line, then the default keystore file (if any) is checked\&. If the public key certificate for a signer matches an entry in the keystore, then the alias name for the keystore entry for that signer is displayed in parentheses\&. If the signer comes from a JDK 1\&.1 identity database instead of from a keystore, then the alias name displays in brackets instead of parentheses\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   447
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   448
-certchain \fIfile\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   449
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   450
Specifies the certificate chain to be used when the certificate chain associated with the private key of the keystore entry that is addressed by the alias specified on the command line is not complete\&. This can happen when the keystore is located on a hardware token where there is not enough capacity to hold a complete certificate chain\&. The file can be a sequence of concatenated X\&.509 certificates, or a single PKCS#7 formatted data block, either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard\&. See Internet RFC 1421 Certificate Encoding Standard and http://tools\&.ietf\&.org/html/rfc1421\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   451
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   452
-verbose
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   453
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   454
When the \f3-verbose\fR option appears on the command line, it indicates verbose mode, which causes \f3jarsigner\fR to output extra information about the progress of the JAR signing or verification\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   455
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   456
-internalsf
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   457
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   458
In the past, the \f3\&.DSA\fR (signature block) file generated when a JAR file was signed included a complete encoded copy of the \f3\&.SF\fR file (signature file) also generated\&. This behavior has been changed\&. To reduce the overall size of the output JAR file, the \f3\&.DSA\fR file by default does not contain a copy of the \f3\&.SF\fR file anymore\&. If \f3-internalsf\fR appears on the command line, then the old behavior is utilized\&. This option is useful for testing\&. In practice, do not use the \f3-internalsf\fR option because it incurs higher overhead\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   459
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   460
-sectionsonly
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   461
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   462
If the \f3-sectionsonly\fR option appears on the command line, then the \f3\&.SF\fR file (signature file) generated when a JAR file is signed does not include a header that contains a hash of the whole manifest file\&. It contains only the information and hashes related to each individual source file included in the JAR file\&. See Signature File\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   463
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   464
By default, this header is added, as an optimization\&. When the header is present, whenever the JAR file is verified, the verification can first check to see whether the hash in the header matches the hash of the whole manifest file\&. When there is a match, verification proceeds to the next step\&. When there is no match, it is necessary to do a less optimized verification that the hash in each source file information section in the \f3\&.SF\fR file equals the hash of its corresponding section in the manifest file\&. See JAR File Verification\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   465
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   466
The \f3-sectionsonly\fR option is primarily used for testing\&. It should not be used other than for testing because using it incurs higher overhead\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   467
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   468
-protected
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   469
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   470
Values can be either \f3true\fR or \f3false\fR\&. Specify \f3true\fR when a password must be specified through a protected authentication path such as a dedicated PIN reader\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   471
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   472
-providerClass \fIprovider-class-name\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   473
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   474
Used to specify the name of cryptographic service provider\&'s master class file when the service provider is not listed in the \f3java\&.security\fR security properties file\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   475
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   476
Used with the \f3-providerArg ConfigFilePath\fR option, the \f3keytool\fR and \f3jarsigner\fR tools install the provider dynamically and use \fIConfigFilePath\fR for the path to the token configuration file\&. The following example shows a command to list a \f3PKCS #11\fR keystore when the Oracle PKCS #11 provider was not configured in the security properties file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   477
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   478
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   479
\f3jarsigner \-keystore NONE \-storetype PKCS11 \e\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   480
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   481
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   482
\f3          \-providerClass sun\&.security\&.pkcs11\&.SunPKCS11 \e\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   483
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   484
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   485
\f3          \-providerArg /mydir1/mydir2/token\&.config \e\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   486
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   487
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   488
\f3          \-list\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   489
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   490
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   491
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   492
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   493
.sp     
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   494
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   495
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   496
-providerName \fIproviderName\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   497
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   498
If more than one provider was configured in the \f3java\&.security\fR security properties file, then you can use the \f3-providerName\fR option to target a specific provider instance\&. The argument to this option is the name of the provider\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   499
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   500
For the Oracle PKCS #11 provider, \fIproviderName\fR is of the form \f3SunPKCS11-\fR\fITokenName\fR, where \fITokenName\fR is the name suffix that the provider instance has been configured with, as detailed in the configuration attributes table\&. For example, the following command lists the contents of the \f3PKCS #11\fR keystore provider instance with name suffix \f3SmartCard\fR:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   501
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   502
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   503
\f3jarsigner \-keystore NONE \-storetype PKCS11 \e\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   504
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   505
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   506
\f3        \-providerName SunPKCS11\-SmartCard \e\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   507
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   508
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   509
\f3        \-list\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   510
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   511
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   512
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   513
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   514
.sp     
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   515
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   516
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   517
-J\fIjavaoption\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   518
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   519
Passes through the specified \fIjavaoption\fR string directly to the Java interpreter\&. The \f3jarsigner\fR command is a wrapper around the interpreter\&. This option should not contain any spaces\&. It is useful for adjusting the execution environment or memory usage\&. For a list of possible interpreter options, type \f3java -h\fR or \f3java -X\fR at the command line\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   520
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   521
-tsa \fIurl\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   522
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   523
If \f3-tsa http://example\&.tsa\&.url\fR appears on the command line when signing a JAR file then a time stamp is generated for the signature\&. The URL, \f3http://example\&.tsa\&.url\fR, identifies the location of the Time Stamping Authority (TSA) and overrides any URL found with the \f3-tsacert\fR option\&. The \f3-tsa\fR option does not require the TSA public key certificate to be present in the keystore\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   524
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   525
To generate the time stamp, \f3jarsigner\fR communicates with the TSA with the Time-Stamp Protocol (TSP) defined in RFC 3161\&. When successful, the time stamp token returned by the TSA is stored with the signature in the signature block file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   526
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   527
-tsacert \fIalias\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   528
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   529
When \f3-tsacert alias\fR appears on the command line when signing a JAR file, a time stamp is generated for the signature\&. The alias identifies the TSA public key certificate in the keystore that is in effect\&. The entry\&'s certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   530
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   531
The TSA public key certificate must be present in the keystore when using the \f3-tsacert\fR option\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   532
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   533
-tsapolicyid \fIpolicyid\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   534
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   535
Specifies the object identifier (OID) that identifies the policy ID to be sent to the TSA server\&. If this option is not specified, no policy ID is sent and the TSA server will choose a default policy ID\&.
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   536
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   537
Object identifiers are defined by X\&.696, which is an ITU Telecommunication Standardization Sector (ITU-T) standard\&. These identifiers are typically period-separated sets of non-negative digits like \f31\&.2\&.3\&.4\fR, for example\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   538
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   539
-altsigner \fIclass\fR
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   540
.br
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   541
This option specifies an alternative signing mechanism\&. The fully qualified class name identifies a class file that extends the \f3com\&.sun\&.jarsigner\&.ContentSigner\fR abstract class\&. The path to this class file is defined by the \f3-altsignerpath\fR option\&. If the \f3-altsigner\fR option is used, then the \f3jarsigner\fR command uses the signing mechanism provided by the specified class\&. Otherwise, the \f3jarsigner\fR command uses its default signing mechanism\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   542
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   543
For example, to use the signing mechanism provided by a class named \f3com\&.sun\&.sun\&.jarsigner\&.AuthSigner\fR, use the jarsigner option \f3-altsigner com\&.sun\&.jarsigner\&.AuthSigner\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   544
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   545
-altsignerpath \fIclasspathlist\fR
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   546
.br
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   547
Specifies the path to the class file and any JAR file it depends on\&. The class file name is specified with the \f3-altsigner\fR option\&. If the class file is in a JAR file, then this option specifies the path to that JAR file\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   548
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   549
An absolute path or a path relative to the current directory can be specified\&. If \fIclasspathlist\fR contains multiple paths or JAR files, then they should be separated with a colon (:) on Oracle Solaris and a semicolon (;) on Windows\&. This option is not necessary when the class is already in the search path\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   550
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   551
The following example shows how to specify the path to a JAR file that contains the class file\&. The JAR file name is included\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   552
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   553
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   554
\f3\-altsignerpath /home/user/lib/authsigner\&.jar\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   555
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   556
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   557
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   558
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   559
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   560
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   561
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   562
The following example shows how to specify the path to the JAR file that contains the class file\&. The JAR file name is omitted\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   563
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   564
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   565
\f3\-altsignerpath /home/user/classes/com/sun/tools/jarsigner/\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   566
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   567
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   568
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   569
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   570
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   571
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   572
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   573
-strict
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   574
.br
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   575
During the signing or verifying process, the command may issue warning messages\&. If you specify this option, the exit code of the tool reflects the severe warning messages that this command found\&. See Errors and Warnings\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   576
.TP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   577
-verbose \fIsuboptions\fR
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   578
.br
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   579
For the verifying process, the \f3-verbose\fR option takes suboptions to determine how much information is shown\&. If the \f3-certs\fR option is also specified, then the default mode (or suboption \f3all\fR) displays each entry as it is being processed, and after that, the certificate information for each signer of the JAR file\&. If the \f3-certs\fR and the \f3-verbose:grouped\fR suboptions are specified, then entries with the same signer info are grouped and displayed together with their certificate information\&. If \f3-certs\fR and the \f3-verbose:summary\fR suboptions are specified, then entries with the same signer information are grouped and displayed together with their certificate information\&. Details about each entry are summarized and displayed as \fIone entry (and more)\fR\&. See Examples\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   580
.SH ERRORS\ AND\ WARNINGS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   581
During the signing or verifying process, the \f3jarsigner\fR command may issue various errors or warnings\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   582
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   583
If there is a failure, the \f3jarsigner\fR command exits with code 1\&. If there is no failure, but there are one or more severe warnings, the \f3jarsigner\fR command exits with code 0 when the \f3-strict\fR option is \fInot\fR specified, or exits with the OR-value of the warning codes when the \f3-strict\fR is specified\&. If there is only informational warnings or no warning at all, the command always exits with code 0\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   584
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   585
For example, if a certificate used to sign an entry is expired and has a KeyUsage extension that does not allow it to sign a file, the \f3jarsigner\fR command exits with code 12 (=4+8) when the \f3-strict\fR option is specified\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   586
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   587
\fINote:\fR Exit codes are reused because only the values from 0 to 255 are legal on Unix-based operating systems\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   588
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   589
The following sections describes the names, codes, and descriptions of the errors and warnings that the \f3jarsigner\fR command can issue\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   590
.SS FAILURE    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   591
Reasons why the \f3jarsigner\fR command fails include (but are not limited to) a command line parsing error, the inability to find a keypair to sign the JAR file, or the verification of a signed JAR fails\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   592
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   593
failure
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   594
Code 1\&. The signing or verifying fails\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   595
.SS SEVERE\ WARNINGS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   596
\fINote:\fR Severe warnings are reported as errors if you specify the \f3-strict\fR option\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   597
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   598
Reasons why the \f3jarsigner\fR command issues a severe warning include the certificate used to sign the JAR file has an error or the signed JAR file has other problems\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   599
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   600
hasExpiredCert
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   601
Code 4\&. This jar contains entries whose signer certificate has expired\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   602
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   603
notYetValidCert
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   604
Code 4\&. This jar contains entries whose signer certificate is not yet valid\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   605
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   606
chainNotValidated
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   607
Code 4\&. This jar contains entries whose certificate chain cannot be correctly validated\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   608
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   609
badKeyUsage
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   610
Code 8\&. This jar contains entries whose signer certificate\&'s KeyUsage extension doesn\&'t allow code signing\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   611
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   612
badExtendedKeyUsage
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   613
Code 8\&. This jar contains entries whose signer certificate\&'s ExtendedKeyUsage extension doesn\&'t allow code signing\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   614
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   615
badNetscapeCertType
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   616
Code 8\&. This jar contains entries whose signer certificate\&'s NetscapeCertType extension doesn\&'t allow code signing\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   617
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   618
hasUnsignedEntry
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   619
Code 16\&. This jar contains unsigned entries which have not been integrity-checked\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   620
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   621
notSignedByAlias
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   622
Code 32\&. This jar contains signed entries which are not signed by the specified alias(es)\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   623
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   624
aliasNotInStore
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   625
Code 32\&. This jar contains signed entries that are not signed by alias in this keystore\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   626
.SS INFORMATIONAL\ WARNINGS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   627
Informational warnings include those that are not errors but regarded as bad practice\&. They do not have a code\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   628
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   629
hasExpiringCert
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   630
This jar contains entries whose signer certificate will expire within six months\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   631
.TP     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   632
noTimestamp
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   633
This jar contains signatures that does not include a timestamp\&. Without a timestamp, users may not be able to validate this JAR file after the signer certificate\&'s expiration date (\f3YYYY-MM-DD\fR) or after any future revocation date\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   634
.SH EXAMPLES    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   635
.SS SIGN\ A\ JAR\ FILE    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   636
Use the following command to sign bundle\&.jar with the private key of a user whose keystore alias is \f3jane\fR in a keystore named \f3mystore\fR in the \f3working\fR directory and name the signed JAR file \f3sbundle\&.jar\fR:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   637
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   638
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   639
\f3jarsigner \-keystore /working/mystore\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   640
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   641
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   642
\f3    \-storepass <keystore password>\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   643
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   644
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   645
\f3    \-keypass <private key password>\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   646
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   647
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   648
\f3    \-signedjar sbundle\&.jar bundle\&.jar jane\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   649
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   650
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   651
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   652
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   653
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   654
There is no \f3-sigfile\fR specified in the previous command so the generated \f3\&.SF\fR and \f3\&.DSA\fR files to be placed in the signed JAR file have default names based on the alias name\&. They are named \f3JANE\&.SF\fR and \f3JANE\&.DSA\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   655
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   656
If you want to be prompted for the store password and the private key password, then you could shorten the previous command to the following:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   657
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   658
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   659
\f3jarsigner \-keystore /working/mystore\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   660
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   661
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   662
\f3    \-signedjar sbundle\&.jar bundle\&.jar jane\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   663
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   664
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   665
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   666
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   667
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   668
If the keystore is the default keystore (\&.keystore in your home directory), then you do not need to specify a keystore, as follows:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   669
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   670
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   671
\f3jarsigner \-signedjar sbundle\&.jar bundle\&.jar jane\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   672
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   673
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   674
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   675
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   676
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   677
If you want the signed JAR file to overwrite the input JAR file (bundle\&.jar), then you do not need to specify a \f3-signedjar\fR option, as follows:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   678
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   679
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   680
\f3jarsigner bundle\&.jar jane\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   681
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   682
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   683
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   684
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   685
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   686
.SS VERIFY\ A\ SIGNED\ JAR\ FILE    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   687
To verify a signed JAR file to ensure that the signature is valid and the JAR file was not been tampered with, use a command such as the following:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   688
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   689
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   690
\f3jarsigner \-verify sbundle\&.jar\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   691
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   692
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   693
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   694
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   695
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   696
When the verification is successful, \f3jar verified\fR is displayed\&. Otherwise, an error message is displayed\&. You can get more information when you use the \f3-verbose\fR option\&. A sample use of \f3jarsigner\fR with the\f3-verbose\fR option follows:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   697
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   698
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   699
\f3jarsigner \-verify \-verbose sbundle\&.jar\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   700
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   701
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   702
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   703
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   704
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   705
\f3           198 Fri Sep 26 16:14:06 PDT 1997 META\-INF/MANIFEST\&.MF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   706
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   707
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   708
\f3           199 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE\&.SF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   709
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   710
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   711
\f3          1013 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE\&.DSA\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   712
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   713
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   714
\f3    smk   2752 Fri Sep 26 16:12:30 PDT 1997 AclEx\&.class\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   715
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   716
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   717
\f3    smk    849 Fri Sep 26 16:12:46 PDT 1997 test\&.class\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   718
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   719
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   720
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   721
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   722
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   723
\f3      s = signature was verified\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   724
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   725
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   726
\f3      m = entry is listed in manifest\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   727
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   728
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   729
\f3      k = at least one certificate was found in keystore\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   730
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   731
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   732
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   733
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   734
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   735
\f3    jar verified\&.\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   736
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   737
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   738
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   739
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   740
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   741
.SS VERIFICATION\ WITH\ CERTIFICATE\ INFORMATION    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   742
If you specify the \f3-certs\fR option with the \f3-verify\fR and \f3-verbose\fR options, then the output includes certificate information for each signer of the JAR file\&. The information includes the certificate type, the signer distinguished name information (when it is an X\&.509 certificate), and in parentheses, the keystore alias for the signer when the public key certificate in the JAR file matches the one in a keystore entry, for example:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   743
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   744
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   745
\f3jarsigner \-keystore /working/mystore \-verify \-verbose \-certs myTest\&.jar\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   746
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   747
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   748
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   749
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   750
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   751
\f3           198 Fri Sep 26 16:14:06 PDT 1997 META\-INF/MANIFEST\&.MF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   752
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   753
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   754
\f3           199 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE\&.SF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   755
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   756
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   757
\f3          1013 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE\&.DSA\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   758
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   759
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   760
\f3           208 Fri Sep 26 16:23:30 PDT 1997 META\-INF/JAVATEST\&.SF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   761
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   762
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   763
\f3          1087 Fri Sep 26 16:23:30 PDT 1997 META\-INF/JAVATEST\&.DSA\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   764
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   765
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   766
\f3    smk   2752 Fri Sep 26 16:12:30 PDT 1997 Tst\&.class\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   767
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   768
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   769
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   770
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   771
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   772
\f3      X\&.509, CN=Test Group, OU=Java Software, O=Oracle, L=CUP, S=CA, C=US (javatest)\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   773
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   774
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   775
\f3      X\&.509, CN=Jane Smith, OU=Java Software, O=Oracle, L=cup, S=ca, C=us (jane)\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   776
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   777
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   778
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   779
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   780
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   781
\f3      s = signature was verified\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   782
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   783
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   784
\f3      m = entry is listed in manifest\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   785
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   786
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   787
\f3      k = at least one certificate was found in keystore\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   788
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   789
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   790
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   791
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   792
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   793
\f3    jar verified\&.\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   794
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   795
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   796
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   797
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   798
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   799
If the certificate for a signer is not an X\&.509 certificate, then there is no distinguished name information\&. In that case, just the certificate type and the alias are shown\&. For example, if the certificate is a PGP certificate, and the alias is \f3bob\fR, then you would get: \f3PGP, (bob)\fR\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   800
.SS VERIFICATION\ THAT\ INCLUDES\ IDENTITY\ DATABASE\ SIGNERS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   801
If a JAR file was signed with the JDK 1\&.1 \f3javakey\fR tool, and the signer is an alias in an identity database, then the verification output includes an \f3i\fR\&. If the JAR file was signed by both an alias in an identity database and an alias in a keystore, then both \f3k\fR and \f3i\fR appear\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   802
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   803
When the \f3-certs\fR option is used, any identity database aliases are shown in brackets rather than the parentheses used for keystore aliases, for example:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   804
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   805
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   806
\f3    jarsigner \-keystore /working/mystore \-verify \-verbose \-certs writeFile\&.jar\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   807
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   808
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   809
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   810
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   811
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   812
\f3           198 Fri Sep 26 16:14:06 PDT 1997 META\-INF/MANIFEST\&.MF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   813
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   814
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   815
\f3           199 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE\&.SF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   816
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   817
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   818
\f3          1013 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE\&.DSA\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   819
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   820
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   821
\f3           199 Fri Sep 27 12:22:30 PDT 1997 META\-INF/DUKE\&.SF\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   822
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   823
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   824
\f3          1013 Fri Sep 27 12:22:30 PDT 1997 META\-INF/DUKE\&.DSA\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   825
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   826
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   827
\f3   smki   2752 Fri Sep 26 16:12:30 PDT 1997 writeFile\&.html\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   828
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   829
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   830
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   831
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   832
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   833
\f3      X\&.509, CN=Jane Smith, OU=Java Software, O=Oracle, L=cup, S=ca, C=us (jane)\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   834
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   835
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   836
\f3      X\&.509, CN=Duke, OU=Java Software, O=Oracle, L=cup, S=ca, C=us [duke]\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   837
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   838
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   839
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   840
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   841
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   842
\f3      s = signature was verified\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   843
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   844
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   845
\f3      m = entry is listed in manifest\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   846
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   847
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   848
\f3      k = at least one certificate was found in keystore\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   849
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   850
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   851
\f3      i = at least one certificate was found in identity scope\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   852
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   853
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   854
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   855
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   856
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   857
\f3    jar verified\&.\fP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   858
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   859
.nf     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   860
\f3\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   861
.fi     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   862
.sp     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   863
\fINote:\fR The alias \f3duke\fR is in brackets to denote that it is an identity database alias, and not a keystore alias\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   864
.SH JDK\ 1\&.1\ COMPATIBILITY    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   865
The \f3keytool\fR and \f3jarsigner\fR tools replace the \f3javakey\fR tool in JDK 1\&.1\&. These new tools provide more features than \f3javakey\fR, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   866
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   867
The new keystore architecture replaces the identity database that \f3javakey\fR created and managed\&. There is no backward compatibility between the keystore format and the database format used by \f3javakey\fR in JDK 1\&.1\&. However, be aware of the following:
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   868
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   869
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   870
It is possible to import the information from an identity database into a keystore through the \f3keytool -identitydb\fR command\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   871
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   872
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   873
The \f3jarsigner\fR command can sign JAR files that were signed with the \f3javakey\fR command\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   874
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   875
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   876
The \f3jarsigner\fR command can verify JAR files signed with \f3javakey\fR\&. The \f3jarsigner\fR command recognizes and can work with signer aliases that are from a JDK 1\&.1 identity database rather than a JDK keystore\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   877
.SS UNSIGNED\ JARS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   878
Unsigned JARs have the default privileges that are granted to all code\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   879
.SS SIGNED\ JARS    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   880
Signed JARs have the privilege configurations based on their JDK 1\&.1\&.\fIn\fR identity and policy file status as described\&. Only trusted identities can be imported into the JDK keystore\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   881
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   882
Default Privileges Granted to All Code
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   883
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   884
Identity in 1\&.1 database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   885
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   886
Trusted identity imported into Java keystore from 1\&.1\&. database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   887
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   888
Policy file grants privileges to identity/alias: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   889
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   890
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   891
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   892
Identity in 1\&.1 database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   893
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   894
Trusted identity imported into Java keystore from 1\&.1\&. database: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   895
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   896
Policy file grants privileges to identity/alias: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   897
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   898
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   899
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   900
Identity in 1\&.1 database: Yes/Untrusted
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   901
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   902
Trusted identity imported into Java keystore from 1\&.1\&. database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   903
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   904
Policy file grants privileges to identity/alias: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   905
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   906
See 3 in Notes Regarding Privileges of Signed JARs\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   907
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   908
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   909
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   910
Identity in 1\&.1 database: Yes/Untrusted
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   911
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   912
Trusted identity imported into Java keystore from 1\&.1\&. database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   913
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   914
Policy file grants privileges to identity/alias: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   915
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   916
See 1 and 3 in Notes Regarding Privileges of Signed JARs\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   917
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   918
Default Privileges and Policy File Privileges Granted
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   919
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   920
Identity in 1\&.1 database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   921
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   922
Trusted identity imported into Java keystore from 1\&.1\&. database: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   923
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   924
Policy file grants privileges to identity/alias: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   925
.PP
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   926
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   927
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   928
Identity in 1\&.1 database: \fIYes/Trusted\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   929
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   930
Trusted identity imported into Java keystore from 1\&.1\&. database: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   931
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   932
Policy file grants privileges to identity/alias: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   933
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   934
See 2 in Notes Regarding Privileges of Signed JARs\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   935
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   936
All Privileges Granted
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   937
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   938
Identity in 1\&.1 database: \fIYes/Trusted\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   939
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   940
Trusted identity imported into Java keystore from 1\&.1\&. database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   941
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   942
Policy file grants privileges to identity/alias: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   943
.PP
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
diff changeset
   944
21743
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   945
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   946
Identity in 1\&.1 database: \fIYes/Trusted\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   947
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   948
Trusted identity imported into Java keystore from 1\&.1\&. database: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   949
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   950
Policy file grants privileges to identity/alias: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   951
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   952
See 1 in Notes Regarding Privileges of Signed JARs\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   953
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   954
Identity in 1\&.1 database: \fIYes/Trusted\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   955
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   956
Trusted identity imported into Java keystore from 1\&.1\&. database: \fINo\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   957
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   958
Policy file grants privileges to identity/alias: \fIYes\fR
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   959
.br     
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   960
See 1 in Notes Regarding Privileges of Signed JARs\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   961
.PP
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   962
Notes Regarding Privileges of Signed JARs
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   963
.TP 0.4i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   964
1\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   965
If an identity or alias is mentioned in the policy file, then it must be imported into the keystore for the policy file to have any effect on privileges granted\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   966
.TP 0.4i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   967
2\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   968
The policy file/keystore combination has precedence over a trusted identity in the identity database\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   969
.TP 0.4i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   970
3\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   971
Untrusted identities are ignored in the Java platform\&.
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   972
.SH SEE\ ALSO    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   973
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   974
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   975
jar(1)
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   976
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   977
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   978
keytool(1)
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   979
.TP 0.2i    
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   980
\(bu
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   981
Trail: Security Features in Java SE at http://docs\&.oracle\&.com/javase/tutorial/security/index\&.html
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   982
.RE
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   983
.br
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   984
'pl 8.5i
3d979da7bdf0 8029043: Update nroff files for JDK 8
rgallard
parents: 12047
diff changeset
   985
'bp