4176N/A." Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A."
0N/A." This code is free software; you can redistribute it and/or modify it
0N/A." under the terms of the GNU General Public License version 2 only, as
0N/A." published by the Free Software Foundation.
0N/A."
0N/A." This code is distributed in the hope that it will be useful, but WITHOUT
0N/A." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A." version 2 for more details (a copy is included in the LICENSE file that
0N/A." accompanied this code).
0N/A."
0N/A." You should have received a copy of the GNU General Public License version
0N/A." 2 along with this work; if not, write to the Free Software Foundation,
0N/A." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A."
2362N/A." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A." or visit www.oracle.com if you need additional information or have any
2362N/A." questions.
0N/A."
4880N/A.TH jarsigner 1 "16 Mar 2012"
0N/A
0N/A.LP
1178N/A.SH "Name"
0N/Ajarsigner \- JAR Signing and Verification Tool
0N/A.LP
0N/A.LP
0N/AGenerates signatures for Java ARchive (JAR) files, and verifies the signatures of signed JAR files.
0N/A.LP
0N/A.SH "SYNOPSIS"
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A\fP\f3jarsigner\fP [ options ] jar\-file alias
0N/A.fl
1178N/A\f3jarsigner\fP \-verify [ options ] jar\-file [alias...]
0N/A.fl
0N/A.fi
0N/A
0N/A.LP
1178N/A.LP
1178N/AThe jarsigner \-verify command can take zero or more keystore alias names after the jar filename. When specified, jarsigner will check 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 \-keystore, or the default keystore.
1178N/A.LP
0N/A.SH "DESCRIPTION"
0N/A.LP
0N/A.LP
0N/AThe \f3jarsigner\fP tool is used for two purposes:
0N/A.LP
0N/A.RS 3
0N/A.TP 3
0N/A1.
0N/Ato sign Java ARchive (JAR) files, and
0N/A.TP 3
0N/A2.
0N/Ato verify the signatures and integrity of signed JAR files.
0N/A.RE
0N/A
0N/A.LP
0N/A.LP
1178N/AThe 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 jar(1) enables developers to produce JAR files. (Technically, any zip file can also be considered a JAR file, although when created by \f3jar\fP or processed by \f3jarsigner\fP, JAR files also contain a META\-INF/MANIFEST.MF file.)
0N/A.LP
0N/A.LP
0N/AA \f2digital signature\fP 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, etc.). Like a handwritten signature, a digital signature has many useful characteristics:
0N/A.LP
0N/A.RS 3
0N/A.TP 2
0N/Ao
0N/AIts authenticity can be verified, via a computation that uses the public key corresponding to the private key used to generate the signature.
0N/A.TP 2
0N/Ao
0N/AIt cannot be forged, assuming the private key is kept secret.
0N/A.TP 2
0N/Ao
0N/AIt is a function of the data signed and thus can't be claimed to be the signature for other data as well.
0N/A.TP 2
0N/Ao
0N/AThe signed data cannot be changed; if it is, the signature will no longer verify as being authentic.
0N/A.RE
0N/A
0N/A.LP
0N/A.LP
0N/AIn order for an entity's signature to be generated for a file, the entity must first have a public/private key pair associated with it, and also one or more certificates authenticating its public key. A \f2certificate\fP is a digitally signed statement from one entity, saying that the public key of some other entity has a particular value.
0N/A.LP
0N/A.LP
1178N/A\f3jarsigner\fP uses key and certificate information from a \f2keystore\fP to generate digital signatures for JAR files. A keystore is a database of private keys and their associated X.509 certificate chains authenticating the corresponding public keys. The keytool(1) utility is used to create and administer keystores.
0N/A.LP
0N/A.LP
0N/A\f3jarsigner\fP 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. \f3jarsigner\fP can verify the digital signature of the signed JAR file using the certificate inside it (in its signature block file).
0N/A.LP
0N/A.LP
1178N/A\f3jarsigner\fP can generate signatures that include a timestamp, thus enabling systems/deployer (including Java Plug\-in) to check whether the JAR file was signed while the signing certificate was still valid. In addition, APIs will allow applications to obtain the timestamp information.
0N/A.LP
0N/A.LP
1178N/AAt this time, \f3jarsigner\fP can only sign JAR files created by the SDK jar(1) tool or zip files. (JAR files are the same as zip files, except they also have a META\-INF/MANIFEST.MF file. Such a file will automatically be created when \f3jarsigner\fP signs a zip file.)
0N/A.LP
0N/A.LP
0N/AThe default \f3jarsigner\fP behavior is to \f2sign\fP a JAR (or zip) file. Use the \f2\-verify\fP option to instead have it \f2verify\fP a signed JAR file.
0N/A.LP
0N/A.SS
1178N/AKeystore Aliases
1178N/A.LP
1178N/A.LP
1178N/AAll keystore entities are accessed via unique \f2aliases\fP.
1178N/A.LP
1178N/A.LP
1178N/AWhen using \f3jarsigner\fP to sign a JAR file, you must specify the alias for the keystore entry containing the private key needed to generate the signature. For example, the following will sign the JAR file named "MyJARFile.jar", using the private key associated with the alias "duke" in the keystore named "mystore" in the "working" directory. Since no output file is specified, it overwrites MyJARFile.jar with the signed JAR file.
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
4176N/A jarsigner \-keystore /working/mystore \-storepass \fP\f4<keystore password>\fP\f3
1178N/A.fl
4176N/A \-keypass \fP\f4<private key password>\fP\f3 MyJARFile.jar duke
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
4176N/AKeystores are protected with a password, so the store password must be specified. You will be prompted for it if you don't 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 will be prompted for it if you don't specify it on the command line and it isn't the same as the store password.
1178N/A.LP
1178N/A.SS
1178N/AKeystore Location
1178N/A.LP
1178N/A.LP
1178N/A\f3jarsigner\fP has a \f2\-keystore\fP option for specifying the URL of the keystore to be used. The keystore is by default stored in a file named \f2.keystore\fP in the user's home directory, as determined by the \f2user.home\fP system property. On Solaris systems \f2user.home\fP defaults to the user's home directory.
1178N/A.LP
1178N/A.LP
1178N/ANote that the input stream from the \f2\-keystore\fP option is passed to the \f2KeyStore.load\fP method. If \f2NONE\fP is specified as the URL, then a null stream is passed to the \f2KeyStore.load\fP method. \f2NONE\fP should be specified if the \f2KeyStore\fP is not file\-based, for example, if it resides on a hardware token device.
1178N/A.LP
1178N/A.SS
1178N/AKeystore Implementation
1178N/A.LP
1178N/A.LP
1178N/AThe \f2KeyStore\fP class provided in the \f2java.security\fP package supplies well\-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular \f2type\fP of keystore.
1178N/A.LP
1178N/A.LP
1178N/ACurrently, there are two command\-line tools that make use of keystore implementations (\f3keytool\fP and \f3jarsigner\fP), and also a GUI\-based tool named \f3Policy Tool\fP. Since \f2KeyStore\fP is publicly available, Java 2 SDK users can write additional security applications that use it.
1178N/A.LP
1178N/A.LP
1178N/AThere is a built\-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.
1178N/A.LP
1178N/A.LP
1178N/AKeystore implementations are provider\-based. More specifically, the application interfaces supplied by \f2KeyStore\fP are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract \f2KeystoreSpi\fP class, also in the \f2java.security\fP package, which 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.) Thus, to provide a keystore implementation, clients must implement a provider and supply a KeystoreSpi subclass implementation, as described in
1178N/A.na
1178N/A\f2How to Implement a Provider for the Java Cryptography Architecture\fP @
1178N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/HowToImplAProvider.html.
1178N/A.LP
1178N/A.LP
1178N/AApplications can choose different \f2types\fP of keystore implementations from different providers, using the "getInstance" factory method supplied in the \f2KeyStore\fP 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.
1178N/A.LP
1178N/A.LP
4176N/A\f3keytool\fP works on any file\-based keystore implementation. (It treats the keystore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL.
1178N/A.LP
1178N/A.LP
1178N/AFor \f3jarsigner\fP and \f3keytool\fP, you can specify a keystore type at the command line, via the \f2\-storetype\fP option. For \f3Policy Tool\fP, you can specify a keystore type via the "Change Keystore" command in the Edit menu.
1178N/A.LP
1178N/A.LP
1178N/AIf you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the \f2keystore.type\fP property specified in the security properties file. The security properties file is called \f2java.security\fP, and it resides in the SDK security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment).
1178N/A.LP
1178N/A.LP
1178N/AEach tool gets the \f2keystore.type\fP value and then examines all the currently\-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider.
1178N/A.LP
1178N/A.LP
1178N/AThe \f2KeyStore\fP class defines a static method named \f2getDefaultType\fP that lets applications and applets retrieve the value of the \f2keystore.type\fP property. The following line of code creates an instance of the default keystore type (as specified in the \f2keystore.type\fP property):
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AThe default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A keystore.type=jks
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/ANote: Case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks".
1178N/A.LP
1178N/A.LP
1178N/ATo have the tools utilize 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 "pkcs12", change the line to
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A keystore.type=pkcs12
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/ANote that if you us the PKCS#11 provider package, you should refer to the
1178N/A.na
1178N/A\f2KeyTool and JarSigner\fP @
1178N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html#KeyToolJarSigner section of the Java PKCS#11 Reference Guide for details.
1178N/A.LP
1178N/A.SS
1178N/ASupported Algorithms
1178N/A.LP
1178N/A.LP
4176N/ABy default, \f3jarsigner\fP signs a JAR file using one of the following:
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
4176N/ADSA (Digital Signature Algorithm) with the SHA1 digest algorithm
1178N/A.TP 2
1178N/Ao
4176N/ARSA algorithm with the SHA256 digest algorithm.
4176N/A.TP 2
4176N/Ao
4176N/AEC (Elliptic Curve) cryptography algorithm with the SHA256 with ECDSA (Elliptic Curve Digital Signature Algorithm).
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A.LP
4176N/AThat is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA256withRSA" algorithm. If the signer's keys are EC keys, \f3jarsigner\fP will sign the JAR file using the "SHA256withECDSA" algorithm.
1178N/A.LP
1178N/A.LP
1178N/AThese default signature algorithms can be overridden using the \f2\-sigalg\fP option.
1178N/A.LP
1178N/A.SS
1178N/AThe Signed JAR File
1178N/A.LP
1178N/A.LP
1178N/AWhen \f3jarsigner\fP 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:
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/Aa signature file, with a .SF extension, and
1178N/A.TP 2
1178N/Ao
4176N/Aa signature block file, with a .DSA, .RSA, or .EC extension.
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AThe base file names for these two files come from the value of the \f2\-sigFile\fP option. For example, if the option appears as
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
4176N/A\-sigFile MKSIGN
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
4176N/AThe files are named "MKSIGN.SF" and "MKSIGN.DSA".
1178N/A.LP
1178N/A.LP
1178N/AIf no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not allowed in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. Legal characters include letters, digits, underscores, and hyphens.
1178N/A.LP
1178N/A\f3The Signature (.SF) File\fP
1178N/A.LP
1178N/A.LP
1178N/AA signature file (the .SF file) looks similar to the manifest file that is always included in a JAR file when \f3jarsigner\fP is used to sign the file. That is, for each source file included in the JAR file, the .SF file has three lines, just as in the manifest file, listing the following:
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/Athe file name,
1178N/A.TP 2
1178N/Ao
1178N/Athe name of the digest algorithm used (SHA), and
1178N/A.TP 2
1178N/Ao
1178N/Aa SHA digest value.
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AIn 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 .SF file, on the other hand, the digest value for a given source file is the hash of the three lines in the manifest file for the source file.
1178N/A.LP
1178N/A.LP
1178N/AThe signature file also, by default, includes a header containing a hash of the whole manifest file. The presence of the header enables verification optimization, as described in JAR File Verification.
1178N/A.LP
4176N/A\f3The Signature Block File\fP
1178N/A.LP
4176N/AThe .SF 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 which authenticates the public key corresponding to the private key used for signing. The file has the extension .DSA, .RSA, or .EC depending on the digest algorithm used.
1178N/A.SS
1178N/ASignature Timestamp
1178N/A.LP
1178N/A.LP
4176N/A\f2jarsigner\fP tool can generate and store a signature timestamp when signing a JAR file. In addition, \f2jarsigner\fP supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through these options:
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/A\f2\-tsa url\fP
1178N/A.TP 2
1178N/Ao
1178N/A\f2\-tsacert alias\fP
1178N/A.TP 2
1178N/Ao
1178N/A\f2\-altsigner class\fP
1178N/A.TP 2
1178N/Ao
1178N/A\f2\-altsignerpath classpathlist\fP
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AEach of these options is detailed in the Options section below.
1178N/A.LP
1178N/A.SS
1178N/AJAR File Verification
1178N/A.LP
1178N/A.LP
1178N/AA successful JAR file verification occurs if the signature(s) are valid, and none of the files that were in the JAR file when the signatures were generated have been changed since then. JAR file verification involves the following steps:
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 3
1178N/A1.
4176N/AVerify the signature of the .SF file itself.
4176N/A.br
4176N/A.br
4176N/AThat is, the verification ensures that the signature stored in each signature block (.DSA) file was in fact generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file has not been tampered with.
1178N/A.TP 3
1178N/A2.
4176N/AVerify the digest listed in each entry in the .SF file with each corresponding section in the manifest.
4176N/A.br
4176N/A.br
4176N/AThe .SF file by default includes a header containing a hash of the entire manifest file. When the header is present, then the verification can check to see whether or not the hash in the header indeed matches the hash of the manifest file. If that is the case, verification proceeds to the next step.
4176N/A.br
4176N/A.br
4176N/AIf that is not the case, a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file (see The Signature (.SF) File).
4176N/A.br
4176N/A.br
4176N/AOne reason the hash of the manifest file that is stored in the .SF file header may not equal the hash of the current manifest file would be because one or more files were added to the JAR file (using the \f2jar\fP tool) after the signature (and thus the .SF file) was generated. When the \f2jar\fP tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the .SF file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the hashes in the non\-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file.
1178N/A.TP 3
1178N/A3.
1178N/ARead each file in the JAR file that has an entry in the .SF file. While reading, compute the file's digest, and then compare the result with the digest for this file in the manifest section. The digests should be the same, or verification fails.
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AIf any serious verification failures occur during the verification process, the process is stopped and a security exception is thrown. It is caught and displayed by \f3jarsigner\fP.
1178N/A.LP
1178N/A.SS
1178N/AMultiple Signatures for a JAR File
1178N/A.LP
1178N/A.LP
1178N/AA JAR file can be signed by multiple people simply by running the \f3jarsigner\fP tool on the file multiple times, specifying the alias for a different person each time, as in:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A jarsigner myBundle.jar susan
1178N/A.fl
1178N/A jarsigner myBundle.jar kevin
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AWhen a JAR file is signed multiple times, there are multiple .SF and .DSA files in the resulting JAR file, one pair for each signature. Thus, in the example above, the output JAR file includes files with the following names:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A SUSAN.SF
1178N/A.fl
1178N/A SUSAN.DSA
1178N/A.fl
1178N/A KEVIN.SF
1178N/A.fl
1178N/A KEVIN.DSA
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/ANote: It is also possible for a JAR file to have mixed signatures, some generated by the JDK 1.1 \f3javakey\fP tool and others by \f3jarsigner\fP. That is, \f3jarsigner\fP can be used to sign JAR files already previously signed using \f3javakey\fP.
1178N/A.LP
1178N/A.SH "OPTIONS"
1178N/A.LP
1178N/A.LP
1178N/AThe various \f3jarsigner\fP options are listed and described below. Note:
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/AAll option names are preceded by a minus sign (\-).
1178N/A.TP 2
1178N/Ao
1178N/AThe options may be provided in any order.
1178N/A.TP 2
1178N/Ao
1178N/AItems in italics (option values) represent the actual values that must be supplied.
1178N/A.TP 2
1178N/Ao
1178N/AThe \f2\-keystore\fP, \f2\-storepass\fP, \f2\-keypass\fP, \f2\-sigfile\fP, \f2\-sigalg\fP, \f2\-digestalg\fP, and \f2\-signedjar\fP options are only relevant when signing a JAR file, not when verifying a signed JAR file. Similarly, an alias is only specified on the command line when signing a JAR file.
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 3
1178N/A\-keystore url
4176N/ASpecifies the URL that tells the keystore location. This defaults to the file \f2.keystore\fP in the user's home directory, as determined by the "user.home" system property.
4176N/A.br
4176N/A.br
4176N/AA keystore is required when signing, so you must explicitly specify one if the default keystore does not exist (or you want to use one other than the default).
4176N/A.br
4176N/A.br
4176N/AA keystore is \f2not\fP required when verifying, but if one is specified, or the default exists, and the \f2\-verbose\fP option was also specified, additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore.
4176N/A.br
4176N/A.br
1178N/ANote: the \f2\-keystore\fP argument can actually be a file name (and path) specification rather than a URL, in which case it will be treated the same as a "file:" URL. That is,
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A \-keystore \fP\f4filePathAndName\fP\f3
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/Ais treated as equivalent to
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A \-keystore file:\fP\f4filePathAndName\fP\f3
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/AIf the Sun PKCS#11 provider has been configured in the \f2java.security\fP security properties file (located in the JRE's \f2$JAVA_HOME/lib/security\fP directory), then keytool and jarsigner can operate on the PKCS#11 token by specifying these options:
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/A\f2\-keystore NONE\fP
1178N/A.TP 2
1178N/Ao
1178N/A\f2\-storetype PKCS11\fP
1178N/A.RE
1178N/AFor example, this command lists the contents of the configured PKCS#11 token:
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A jarsigner \-keystore NONE \-storetype PKCS11 \-list
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A.TP 3
1178N/A\-storetype storetype
4176N/ASpecifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static \f2getDefaultType\fP method in \f2java.security.KeyStore\fP.
4176N/A.br
4176N/A.br
4176N/AThe PIN for a PCKS#11 token can also be specified using the \f2\-storepass\fP option. If none has been specified, keytool and jarsigner will 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 \f2\-protected\fP option must be specified and no password options can be specified.
1178N/A.TP 3
4176N/A\-storepass[:env | :file] argument
4176N/ASpecifies the password which is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for the password.
4176N/A.br
4176N/A.br
4176N/AIf the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP. Otherwise, the password is retrieved as follows:
4176N/A.RS 3
4176N/A.TP 2
4176N/Ao
4176N/A\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP
4176N/A.TP 2
4176N/Ao
4176N/A\f2file\fP: Retrieve the password from the file named \f2argument\fP
4176N/A.RE
4176N/ANote: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system.
1178N/A.TP 3
4176N/A\-keypass[:env | :file] argument
4176N/ASpecifies 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\fP to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, the user is prompted for it.
4176N/A.br
4176N/A.br
4176N/AIf the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP. Otherwise, the password is retrieved as follows:
4176N/A.RS 3
4176N/A.TP 2
4176N/Ao
4176N/A\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP
4176N/A.TP 2
4176N/Ao
4176N/A\f2file\fP: Retrieve the password from the file named \f2argument\fP
4176N/A.RE
4176N/ANote: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system.
1178N/A.TP 3
1178N/A\-sigfile file
4176N/ASpecifies the base file name to be used for the generated .SF and .DSA files. For example, if \f2file\fP is "DUKESIGN", the generated .SF and .DSA files will be named "DUKESIGN.SF" and "DUKESIGN.DSA", and will be placed in the "META\-INF" directory of the signed JAR file.
4176N/A.br
4176N/A.br
4176N/AThe characters in \f2file\fP must come from the set "a\-zA\-Z0\-9_\-". That is, only letters, numbers, underscore, and hyphen characters are allowed. Note: All lowercase characters will be converted to uppercase for the .SF and .DSA file names.
4176N/A.br
4176N/A.br
4176N/AIf no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not legal in a signature file name, each such character is converted to an underscore ("_") character in forming the file name.
1178N/A.TP 3
1178N/A\-sigalg algorithm
4176N/ASpecifies the name of the signature algorithm to use to sign the JAR file.
4176N/A.br
4176N/A.br
1178N/ASee
1178N/A.na
1178N/A\f2Appendix A\fP @
1178N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA, SHA256withRSA, or SHA256withECDSA will be 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 \f2\-providerClass\fP option, otherwise the command will not succeed.
1178N/A.TP 3
1178N/A\-digestalg algorithm
4176N/ASpecifies the name of the message digest algorithm to use when digesting the entries of a jar file.
4176N/A.br
4176N/A.br
1178N/ASee
1178N/A.na
1178N/A\f2Appendix A\fP @
1178N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
1178N/A.TP 3
1178N/A\-signedjar file
4176N/ASpecifies the name to be used for the signed JAR file.
4176N/A.br
4176N/A.br
4176N/AIf no name is specified on the command line, the name used is the same as the input JAR file name (the name of the JAR file to be signed); in other words, that file is overwritten with the signed JAR file.
1178N/A.TP 3
1178N/A\-verify
4176N/AIf this appears on the command line, the specified JAR file will be verified, not signed. If the verification is successful, "jar verified" will be displayed. If you try to verify an unsigned JAR file, or a JAR file signed with an unsupported algorithm (e.g., RSA when you don't have an RSA provider installed), the following is displayed: "jar is unsigned. (signatures missing or not parsable)"
4176N/A.br
4176N/A.br
4176N/AIt is possible to verify JAR files signed using either \f3jarsigner\fP or the JDK 1.1 \f3javakey\fP tool, or both.
4176N/A.br
4176N/A.br
4176N/AFor further information on verification, see JAR File Verification.
1178N/A.TP 3
1178N/A\-certs
1178N/AIf this appears on the command line, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file. This information includes
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/Athe name of the type of certificate (stored in the .DSA file) that certifies the signer's public key
1178N/A.TP 2
1178N/Ao
1178N/Aif the certificate is an X.509 certificate (more specifically, an instance of \f2java.security.cert.X509Certificate\fP): the distinguished name of the signer
1178N/A.RE
1178N/AThe keystore is also examined. If no keystore value is specified on the command line, the default keystore file (if any) will be checked. If the public key certificate for a signer matches an entry in the keystore, then the following information will also be displayed:
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/Ain parentheses, the alias name for the keystore entry for that signer. If the signer actually comes from a JDK 1.1 identity database instead of from a keystore, the alias name will appear in brackets instead of parentheses.
1178N/A.RE
1178N/A.TP 3
1178N/A\-certchain file
1178N/ASpecifies the certificate chain to be used, if the certificate chain associated with the private key of the keystore entry, addressed by the alias specified on the command line, is not complete. This may happen if 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 X.509 certificates concatenated together, 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.
1178N/A.TP 3
1178N/A\-verbose
1178N/AIf this appears on the command line, it indicates "verbose" mode, which causes \f3jarsigner\fP to output extra information as to the progress of the JAR signing or verification.
1178N/A.TP 3
1178N/A\-internalsf
1178N/AIn the past, the .DSA (signature block) file generated when a JAR file was signed used to include a complete encoded copy of the .SF file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the .DSA file by default doesn't contain a copy of the .SF file anymore. But if \f2\-internalsf\fP appears on the command line, the old behavior is utilized. \f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP
1178N/A.TP 3
1178N/A\-sectionsonly
4176N/AIf this appears on the command line, the .SF file (signature file) generated when a JAR file is signed does \f2not\fP include a header containing a hash of the whole manifest file. It just contains information and hashes related to each individual source file included in the JAR file, as described in The Signature (.SF) File .
4176N/A.br
4176N/A.br
4176N/ABy default, this header is added, as an optimization. When the header is present, then whenever the JAR file is verified, the verification can first check to see whether or not the hash in the header indeed matches the hash of the whole manifest file. If so, verification proceeds to the next step. If not, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file.
4176N/A.br
4176N/A.br
4176N/AFor further information, see JAR File Verification.
4176N/A.br
4176N/A.br
4176N/A\f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP
1178N/A.TP 3
1178N/A\-protected
1178N/AEither \f2true\fP or \f2false\fP. This value should be specified as \f2true\fP if a password must be given via a protected authentication path such as a dedicated PIN reader.
1178N/A.TP 3
4176N/A\-providerClass provider\-class\-name
4176N/AUsed to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file, \f2java.security\fP.
4176N/A.br
4176N/A.br
1178N/AUsed in conjunction with the \f2\-providerArg\fP \f2ConfigFilePath\fP option, keytool and jarsigner will install the provider dynamically (where \f2ConfigFilePath\fP is the path to the token configuration file). Here's an example of a command to list a PKCS#11 keystore when the Sun PKCS#11 provider has not been configured in the security properties file.
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/Ajarsigner \-keystore NONE \-storetype PKCS11 \\
1178N/A.fl
1178N/A \-providerClass sun.security.pkcs11.SunPKCS11 \\
1178N/A.fl
1178N/A \-providerArg /foo/bar/token.config \\
1178N/A.fl
1178N/A \-list
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A.TP 3
1178N/A\-providerName providerName
4176N/AIf more than one provider has been configured in the \f2java.security\fP security properties file, you can use the \f2\-providerName\fP option to target a specific provider instance. The argument to this option is the name of the provider.
4176N/A.br
4176N/A.br
1178N/AFor the Sun PKCS#11 provider, \f2providerName\fP is of the form \f2SunPKCS11\-\fP\f2TokenName\fP, where \f2TokenName\fP is the name suffix that the provider instance has been configured with, as detailed in the
1178N/A.na
1178N/A\f2configuration attributes table\fP @
1178N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html#ATTRS. For example, the following command lists the contents of the PKCS#11 keystore provider instance with name suffix \f2SmartCard\fP:
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/Ajarsigner \-keystore NONE \-storetype PKCS11 \\
1178N/A.fl
1178N/A \-providerName SunPKCS11\-SmartCard \\
1178N/A.fl
1178N/A \-list
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A.TP 3
1178N/A\-Jjavaoption
4176N/APasses through the specified \f2javaoption\fP string directly to the Java interpreter. (\f3jarsigner\fP is actually 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 \f2java \-h\fP or \f2java \-X\fP at the command line.
1178N/A.TP 3
1178N/A\-tsa url
4176N/AIf \f2"\-tsa http://example.tsa.url"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The URL, \f2http://example.tsa.url\fP, identifies the location of the Time Stamping Authority (TSA). It overrides any URL found via the \f2\-tsacert\fP option. The \f2\-tsa\fP option does not require the TSA's public key certificate to be present in the keystore.
4176N/A.br
4176N/A.br
1178N/ATo generate the timestamp, \f2jarsigner\fP communicates with the TSA using the Time\-Stamp Protocol (TSP) defined in
1178N/A.na
1178N/A\f2RFC 3161\fP @
1178N/A.fi
4176N/Ahttp://www.ietf.org/rfc/rfc3161.txt. If successful, the timestamp token returned by the TSA is stored along with the signature in the signature block file.
1178N/A.TP 3
1178N/A\-tsacert alias
4176N/AIf \f2"\-tsacert alias"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The \f2alias\fP identifies the TSA's public key certificate in the keystore that is currently in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA.
4176N/A.br
4176N/A.br
4176N/AThe TSA's public key certificate must be present in the keystore when using \f2\-tsacert\fP.
1178N/A.TP 3
1178N/A\-altsigner class
4176N/ASpecifies that an alternative signing mechanism be used. The fully\-qualified class name identifies a class file that extends the \f2com.sun.jarsigner.ContentSigner abstract class\fP. The path to this class file is defined by the \f2\-altsignerpath\fP option. If the \f2\-altsigner\fP option is used, \f2jarsigner\fP uses the signing mechanism provided by the specified class. Otherwise, \f2jarsigner\fP uses its default signing mechanism.
4176N/A.br
4176N/A.br
4176N/AFor example, to use the signing mechanism provided by a class named \f2com.sun.sun.jarsigner.AuthSigner\fP, use the \f2jarsigner\fP option \f2"\-altsigner com.sun.jarsigner.AuthSigner"\fP
1178N/A.TP 3
1178N/A\-altsignerpath classpathlist
4176N/ASpecifies the path to the class file (the class file name is specified with the \f2\-altsigner\fP option described above) and any JAR files it depends on. If the class file is in a JAR file, then this specifies the path to that JAR file, as shown in the example below.
4176N/A.br
4176N/A.br
4176N/AAn absolute path or a path relative to the current directory may be specified. If \f2classpathlist\fP contains multiple paths or JAR files, they should be separated with a colon (\f2:\fP) on Solaris and a semi\-colon (\f2;\fP) on Windows. This option is not necessary if the class is already in the search path.
4176N/A.br
4176N/A.br
1178N/AExample of specifying the path to a jar file that contains the class file:
4176N/A.nf
4176N/A\f3
4176N/A.fl
4176N/A\-altsignerpath /home/user/lib/authsigner.jar
4176N/A.fl
4176N/A\fP
4176N/A.fi
4176N/ANote that the JAR file name is included.
4176N/A.br
4176N/A.br
1178N/AExample of specifying the path to the jar file that contains the class file:
4176N/A.nf
4176N/A\f3
4176N/A.fl
4176N/A\-altsignerpath /home/user/classes/com/sun/tools/jarsigner/
4176N/A.fl
4176N/A\fP
4176N/A.fi
4176N/ANote that the JAR file name is omitted.
1178N/A.TP 3
1178N/A\-strict
1178N/ADuring the signing or verifying process, some warning messages may be shown. If this option appears on the command line, the exit code of the tool will reflect the warning messages that are found. Read the "WARNINGS" section for details.
1178N/A.TP 3
1178N/A\-verbose:sub\-options
1178N/AFor the verifying process, the \f2\-verbose\fP option takes sub\-options to determine how much information will be shown. If \f2\-certs\fP is also specified, the default mode (or sub\-option all) displays each entry as it is being processed and following that, the certificate information for each signer of the JAR file. If \f2\-certs\fP and the \f2\-verbose:grouped\fP sub\-option are specified, entries with the same signer info are grouped and displayed together along with their certificate information. If \f2\-certs\fP and the \f2\-verbose:summary\fP sub\-option are specified, then entries with the same signer info are grouped and displayed together along with their certificate information but details about each entry are summarized and displayed as "one entry (and more)". See the examples section for more information.
1178N/A.RE
4176N/A
1178N/A.LP
4176N/A.SH "EXAMPLES"
1178N/A.LP
1178N/A.SS
1178N/ASigning a JAR File
1178N/A.LP
1178N/A.LP
4176N/ASuppose you have a JAR file named "bundle.jar" and you'd like to sign it using the private key of the user whose keystore alias is "jane" in the keystore named "mystore" in the "working" directory. You can use the following to sign the JAR file and name the signed JAR file "sbundle.jar":
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
4176N/A jarsigner \-keystore /working/mystore \-storepass \fP\f4<keystore password>\fP\f3
1178N/A.fl
4176N/A \-keypass \fP\f4<private key password>\fP\f3 \-signedjar sbundle.jar bundle.jar jane
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/ANote that there is no \f2\-sigfile\fP specified in the command above, so the generated .SF and .DSA files to be placed in the signed JAR file will have default names based on the alias name. That is, they will be named \f2JANE.SF\fP and \f2JANE.DSA\fP.
1178N/A.LP
1178N/A.LP
1178N/AIf you want to be prompted for the store password and the private key password, you could shorten the above command to
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A jarsigner \-keystore /working/mystore
1178N/A.fl
4176N/A \-signedjar sbundle.jar bundle.jar jane
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AIf the keystore to be used is the default keystore (the one named ".keystore" in your home directory), you don't need to specify a keystore, as in:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
4176N/A jarsigner \-signedjar sbundle.jar bundle.jar jane
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AFinally, if you want the signed JAR file to simply overwrite the input JAR file (\f2bundle.jar\fP), you don't need to specify a \f2\-signedjar\fP option:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
4176N/A jarsigner bundle.jar jane
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.SS
1178N/AVerifying a Signed JAR File
1178N/A.LP
1178N/A.LP
1178N/ATo verify a signed JAR file, that is, to verify that the signature is valid and the JAR file has not been tampered with, use a command such as the following:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
4176N/A jarsigner \-verify sbundle.jar
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AIf the verification is successful,
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A jar verified.
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/Ais displayed. Otherwise, an error message appears.
1178N/A.LP
1178N/A.LP
1178N/AYou can get more information if you use the \f2\-verbose\fP option. A sample use of \f3jarsigner\fP with the \f2\-verbose\fP option is shown below, along with sample output:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A jarsigner \-verify \-verbose sbundle.jar
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A 198 Fri Sep 26 16:14:06 PDT 1997 META\-INF/MANIFEST.MF
1178N/A.fl
1178N/A 199 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE.SF
1178N/A.fl
1178N/A 1013 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE.DSA
1178N/A.fl
1178N/A smk 2752 Fri Sep 26 16:12:30 PDT 1997 AclEx.class
1178N/A.fl
1178N/A smk 849 Fri Sep 26 16:12:46 PDT 1997 test.class
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A s = signature was verified
1178N/A.fl
1178N/A m = entry is listed in manifest
1178N/A.fl
1178N/A k = at least one certificate was found in keystore
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A jar verified.
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.SS
1178N/AVerification with Certificate Information
1178N/A.LP
1178N/A.LP
4176N/AIf you specify the \f2\-certs\fP option when verifying, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file, including the certificate type, the signer distinguished name information (if and only if it's an X.509 certificate), and, in parentheses, the keystore alias for the signer if the public key certificate in the JAR file matches that in a keystore entry. For example,
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A jarsigner \-keystore /working/mystore \-verify \-verbose \-certs myTest.jar
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A 198 Fri Sep 26 16:14:06 PDT 1997 META\-INF/MANIFEST.MF
1178N/A.fl
1178N/A 199 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE.SF
1178N/A.fl
1178N/A 1013 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE.DSA
1178N/A.fl
1178N/A 208 Fri Sep 26 16:23:30 PDT 1997 META\-INF/JAVATEST.SF
1178N/A.fl
1178N/A 1087 Fri Sep 26 16:23:30 PDT 1997 META\-INF/JAVATEST.DSA
1178N/A.fl
1178N/A smk 2752 Fri Sep 26 16:12:30 PDT 1997 Tst.class
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A X.509, CN=Test Group, OU=Java Software, O=Sun Microsystems, L=CUP, S=CA, C=US (javatest)
1178N/A.fl
1178N/A X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A s = signature was verified
1178N/A.fl
1178N/A m = entry is listed in manifest
1178N/A.fl
1178N/A k = at least one certificate was found in keystore
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A jar verified.
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AIf the certificate for a signer is not an X.509 certificate, 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 "bob", you'd get
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A PGP, (bob)
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.SS
1178N/AVerification of a JAR File that Includes Identity Database Signers
1178N/A.LP
1178N/A.LP
1178N/AIf a JAR file has been signed using the JDK 1.1 \f3javakey\fP tool, and thus the signer is an alias in an identity database, the verification output includes an "i" symbol. If the JAR file has been signed by both an alias in an identity database and an alias in a keystore, both "k" and "i" appear.
1178N/A.LP
1178N/A.LP
1178N/AWhen the \f2\-certs\fP option is used, any identity database aliases are shown in square brackets rather than the parentheses used for keystore aliases. For example:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A jarsigner \-keystore /working/mystore \-verify \-verbose \-certs writeFile.jar
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A 198 Fri Sep 26 16:14:06 PDT 1997 META\-INF/MANIFEST.MF
1178N/A.fl
1178N/A 199 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE.SF
1178N/A.fl
1178N/A 1013 Fri Sep 26 16:22:10 PDT 1997 META\-INF/JANE.DSA
1178N/A.fl
1178N/A 199 Fri Sep 27 12:22:30 PDT 1997 META\-INF/DUKE.SF
1178N/A.fl
1178N/A 1013 Fri Sep 27 12:22:30 PDT 1997 META\-INF/DUKE.DSA
1178N/A.fl
1178N/A smki 2752 Fri Sep 26 16:12:30 PDT 1997 writeFile.html
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)
1178N/A.fl
1178N/A X.509, CN=Duke, OU=Java Software, O=Sun, L=cup, S=ca, C=us [duke]
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A s = signature was verified
1178N/A.fl
1178N/A m = entry is listed in manifest
1178N/A.fl
1178N/A k = at least one certificate was found in keystore
1178N/A.fl
1178N/A i = at least one certificate was found in identity scope
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A jar verified.
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/ANote that the alias "duke" is in brackets to denote that it is an identity database alias, not a keystore alias.
1178N/A.LP
1178N/A.SH "WARNINGS"
1178N/A.LP
1178N/ADuring the signing/verifying process, jarsigner may display various warnings. These warning codes are defined as follows:
1178N/A.nf
1178N/A\f3
1178N/A.fl
1178N/A hasExpiringCert 2
1178N/A.fl
1178N/A This jar contains entries whose signer certificate will expire within six months
1178N/A.fl
1178N/A
1178N/A.fl
1178N/A hasExpiredCert 4
1178N/A.fl
1178N/A This jar contains entries whose signer certificate has expired.
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A notYetValidCert 4
1178N/A.fl
1178N/A This jar contains entries whose signer certificate is not yet valid.
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A chainNotValidated 4
1178N/A.fl
1178N/A This jar contains entries whose certificate chain cannot be correctly validated.
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A badKeyUsage 8
1178N/A.fl
1178N/A This jar contains entries whose signer certificate's KeyUsage extension doesn't allow code signing.
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A badExtendedKeyUsage 8
1178N/A.fl
1178N/A This jar contains entries whose signer certificate's ExtendedKeyUsage extension
1178N/A.fl
1178N/A doesn't allow code signing.
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A badNetscapeCertType 8
1178N/A.fl
4176N/A This jar contains entries whose signer certificate's NetscapeCertType extension
1178N/A.fl
1178N/A doesn't allow code signing.
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A hasUnsignedEntry 16
1178N/A.fl
1178N/A This jar contains unsigned entries which have not been integrity\-checked.
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A notSignedByAlias 32
1178N/A.fl
1178N/A This jar contains signed entries which are not signed by the specified alias(es)
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A aliasNotInStore 32
1178N/A.fl
1178N/A This jar contains signed entries that are not signed by alias in this keystore
1178N/A.fl
4176N/A
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.LP
1178N/AWhen the \f2\-strict\fP option is provided, an OR\-value of warnings detected will be returned as the exit code of the tool. 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, an exit code 12 (=4+8) will be returned.
1178N/A.LP
1178N/A.LP
4176N/A\f3Note\fP: Exit codes are reused because only 0\-255 is legal for Unix. In any case, if the signing/verifying process fails, the following exit code will be returned:
1178N/A.LP
1178N/A.nf
1178N/A\f3
1178N/A.fl
4176N/Afailure 1
1178N/A.fl
1178N/A\fP
1178N/A.fi
1178N/A
1178N/A.LP
1178N/A.SS
0N/ACompatibility with JDK 1.1
0N/A.LP
0N/A.LP
0N/AThe \f3keytool\fP and \f3jarsigner\fP tools completely replace the \f3javakey\fP tool provided in JDK 1.1. These new tools provide more features than \f3javakey\fP, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them.
0N/A.LP
0N/A.LP
0N/AThe new keystore architecture replaces the identity database that \f3javakey\fP created and managed. There is no backwards compatibility between the keystore format and the database format used by \f3javakey\fP in 1.1. However,
0N/A.LP
0N/A.RS 3
0N/A.TP 2
0N/Ao
0N/AIt is possible to import the information from an identity database into a keystore, via the \f3keytool\fP \f2\-identitydb\fP command.
0N/A.TP 2
0N/Ao
0N/A\f3jarsigner\fP can sign JAR files also previously signed using \f3javakey\fP.
0N/A.TP 2
0N/Ao
0N/A\f3jarsigner\fP can verify JAR files signed using \f3javakey\fP. Thus, it recognizes and can work with signer aliases that are from a JDK 1.1 identity database rather than a Java 2 SDK keystore.
0N/A.RE
0N/A
0N/A.LP
0N/A.LP
0N/AThe following table explains how JAR files that were signed in JDK 1.1.x are treated in the Java 2 platform.
0N/A.LP
0N/A.LP
4880N/A.TS
0N/A.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
0N/A.de 35
0N/A.ps \n(.s
0N/A.vs \n(.vu
0N/A.in \n(.iu
0N/A.if \n(.u .fi
0N/A.if \n(.j .ad
0N/A.if \n(.j=0 .na
0N/A..
0N/A.nf
0N/A.nr #~ 0
0N/A.if n .nr #~ 0.6n
0N/A.ds #d .d
0N/A.if \(ts\n(.z\(ts\(ts .ds #d nl
0N/A.fc
0N/A.nr 33 \n(.s
0N/A.rm 80 81 82 83 84
0N/A.nr 34 \n(.lu
0N/A.eo
0N/A.am 82
0N/A.br
0N/A.di a+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(82 .ll \n(82u
0N/A.in 0
0N/A\f3Trusted Identity imported into Java 2 Platform keystore from 1.1 database (4)\fP
0N/A.br
0N/A.di
0N/A.nr a| \n(dn
0N/A.nr a- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 83
0N/A.br
0N/A.di b+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(83 .ll \n(83u
0N/A.in 0
0N/A\f3Policy File grants privileges to Identity/Alias\fP
0N/A.br
0N/A.di
0N/A.nr b| \n(dn
0N/A.nr b- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 84
0N/A.br
0N/A.di c+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(84 .ll \n(84u
0N/A.in 0
0N/ADefault privileges granted to all code.
0N/A.br
0N/A.di
0N/A.nr c| \n(dn
0N/A.nr c- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 84
0N/A.br
0N/A.di d+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(84 .ll \n(84u
0N/A.in 0
0N/ADefault privileges granted to all code.
0N/A.br
0N/A.di
0N/A.nr d| \n(dn
0N/A.nr d- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 84
0N/A.br
0N/A.di e+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(84 .ll \n(84u
0N/A.in 0
0N/ADefault privileges granted to all code.
0N/A.br
0N/A.di
0N/A.nr e| \n(dn
0N/A.nr e- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 84
0N/A.br
0N/A.di f+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(84 .ll \n(84u
0N/A.in 0
0N/ADefault privileges granted to all code. (3)
0N/A.br
0N/A.di
0N/A.nr f| \n(dn
0N/A.nr f- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 84
0N/A.br
0N/A.di g+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(84 .ll \n(84u
0N/A.in 0
0N/ADefault privileges granted to all code. (1,3)
0N/A.br
0N/A.di
0N/A.nr g| \n(dn
0N/A.nr g- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 84
0N/A.br
0N/A.di h+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(84 .ll \n(84u
0N/A.in 0
0N/ADefault privileges granted to all code plus privileges granted in policy file.
0N/A.br
0N/A.di
0N/A.nr h| \n(dn
0N/A.nr h- \n(dl
0N/A..
0N/A.ec \
0N/A.eo
0N/A.am 84
0N/A.br
0N/A.di i+
0N/A.35
0N/A.ft \n(.f
0N/A.ll \n(34u*1u/6u
0N/A.if \n(.l<\n(84 .ll \n(84u
0N/A.in 0
0N/ADefault privileges granted to all code plus privileges granted in policy file. (2)
0N/A.br
0N/A.di
0N/A.nr i| \n(dn
0N/A.nr i- \n(dl
0N/A..
0N/A.ec \
0N/A.35
0N/A.nf
0N/A.ll \n(34u
0N/A.nr 80 0
0N/A.nr 38 \w\f3JAR File Type\fP
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wUnsigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.nr 38 \wSigned JAR
0N/A.if \n(80<\n(38 .nr 80 \n(38
0N/A.80
0N/A.rm 80
0N/A.nr 81 0
0N/A.nr 38 \w\f3Identity in 1.1 database\fP
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wYES/Untrusted
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wYES/Untrusted
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wYES/Trusted
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wYES/Trusted
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wYES/Trusted
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.nr 38 \wYES/Trusted
0N/A.if \n(81<\n(38 .nr 81 \n(38
0N/A.81
0N/A.rm 81
0N/A.nr 82 0
0N/A.nr 38 \wNO
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.82
0N/A.rm 82
0N/A.nr 38 \n(a-
0N/A.if \n(82<\n(38 .nr 82 \n(38
0N/A.nr 83 0
0N/A.nr 38 \wNO
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wNO
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 38 \wYES
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.83
0N/A.rm 83
0N/A.nr 38 \n(b-
0N/A.if \n(83<\n(38 .nr 83 \n(38
0N/A.nr 84 0
0N/A.nr 38 \w\f3Privileges Granted\fP
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \wAll privileges
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \wAll privileges (1)
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \wAll privileges (1)
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.84
0N/A.rm 84
0N/A.nr 38 \n(c-
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \n(d-
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \n(e-
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \n(f-
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \n(g-
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \n(h-
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.nr 38 \n(i-
0N/A.if \n(84<\n(38 .nr 84 \n(38
0N/A.35
0N/A.nf
0N/A.ll \n(34u
0N/A.nr 38 1n
0N/A.nr 79 0
0N/A.nr 40 \n(79+(0*\n(38)
0N/A.nr 80 +\n(40
0N/A.nr 41 \n(80+(3*\n(38)
0N/A.nr 81 +\n(41
0N/A.nr 42 \n(81+(3*\n(38)
0N/A.nr 82 +\n(42
0N/A.nr 43 \n(82+(3*\n(38)
0N/A.nr 83 +\n(43
0N/A.nr 44 \n(83+(3*\n(38)
0N/A.nr 84 +\n(44
0N/A.nr TW \n(84
4176N/A.if t .if \n(TW>\n(.li .tm Table at line 1082 file Input is too wide - \n(TW units
0N/A.fc
0N/A.nr #T 0-1
0N/A.nr #a 0-1
0N/A.eo
0N/A.de T#
0N/A.ds #d .d
0N/A.if \(ts\n(.z\(ts\(ts .ds #d nl
0N/A.mk ##
0N/A.nr ## -1v
0N/A.ls 1
0N/A.ls
0N/A..
0N/A.ec
0N/A.ne \n(a|u+\n(.Vu
0N/A.ne \n(b|u+\n(.Vu
0N/A.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
0N/A.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'\f3JAR File Type\fP\h'|\n(41u'\f3Identity in 1.1 database\fP\h'|\n(42u'\h'|\n(43u'\h'|\n(44u'\f3Privileges Granted\fP
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(42u
0N/A.in +\n(37u
0N/A.a+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(43u
0N/A.in +\n(37u
0N/A.b+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ne \n(c|u+\n(.Vu
0N/A.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'NO\h'|\n(42u'NO\h'|\n(43u'NO\h'|\n(44u'
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(44u
0N/A.in +\n(37u
0N/A.c+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ne \n(d|u+\n(.Vu
0N/A.if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Unsigned JAR\h'|\n(41u'NO\h'|\n(42u'NO\h'|\n(43u'NO\h'|\n(44u'
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(44u
0N/A.in +\n(37u
0N/A.d+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ne \n(e|u+\n(.Vu
0N/A.if (\n(e|+\n(#^-1v)>\n(#- .nr #- +(\n(e|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'NO\h'|\n(42u'YES\h'|\n(43u'NO\h'|\n(44u'
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(44u
0N/A.in +\n(37u
0N/A.e+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ne \n(f|u+\n(.Vu
0N/A.if (\n(f|+\n(#^-1v)>\n(#- .nr #- +(\n(f|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'YES/Untrusted\h'|\n(42u'NO\h'|\n(43u'NO\h'|\n(44u'
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(44u
0N/A.in +\n(37u
0N/A.f+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ne \n(g|u+\n(.Vu
0N/A.if (\n(g|+\n(#^-1v)>\n(#- .nr #- +(\n(g|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'YES/Untrusted\h'|\n(42u'NO\h'|\n(43u'YES\h'|\n(44u'
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(44u
0N/A.in +\n(37u
0N/A.g+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ne \n(h|u+\n(.Vu
0N/A.if (\n(h|+\n(#^-1v)>\n(#- .nr #- +(\n(h|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'NO\h'|\n(42u'YES\h'|\n(43u'YES\h'|\n(44u'
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(44u
0N/A.in +\n(37u
0N/A.h+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ne \n(i|u+\n(.Vu
0N/A.if (\n(i|+\n(#^-1v)>\n(#- .nr #- +(\n(i|+\n(#^-\n(#--1v)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'YES/Trusted\h'|\n(42u'YES\h'|\n(43u'YES\h'|\n(44u'
0N/A.mk ##
0N/A.nr 31 \n(##
0N/A.sp |\n(##u-1v
0N/A.nr 37 \n(44u
0N/A.in +\n(37u
0N/A.i+
0N/A.in -\n(37u
0N/A.mk 32
0N/A.if \n(32>\n(31 .nr 31 \n(32
0N/A.sp |\n(31u
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'YES/Trusted\h'|\n(42u'NO\h'|\n(43u'NO\h'|\n(44u'All privileges
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'YES/Trusted\h'|\n(42u'YES\h'|\n(43u'NO\h'|\n(44u'All privileges (1)
0N/A.ta \n(80u \n(81u \n(82u \n(83u \n(84u
0N/A.nr 31 \n(.f
0N/A.nr 35 1m
0N/A\&\h'|\n(40u'Signed JAR\h'|\n(41u'YES/Trusted\h'|\n(42u'NO\h'|\n(43u'YES\h'|\n(44u'All privileges (1)
0N/A.fc
0N/A.nr T. 1
0N/A.T# 1
0N/A.35
0N/A.rm a+
0N/A.rm b+
0N/A.rm c+
0N/A.rm d+
0N/A.rm e+
0N/A.rm f+
0N/A.rm g+
0N/A.rm h+
0N/A.rm i+
4880N/A.TE
0N/A.if \n-(b.=0 .nr c. \n(.c-\n(d.-42
0N/A
0N/A.LP
0N/A.LP
0N/ANotes:
0N/A.LP
0N/A.RS 3
0N/A.TP 3
0N/A1.
0N/AIf an identity/alias is mentioned in the policy file, it must be imported into the keystore for the policy file to have any effect on privileges granted.
0N/A.TP 3
0N/A2.
0N/AThe policy file/keystore combination has precedence over a trusted identity in the identity database.
0N/A.TP 3
0N/A3.
0N/AUntrusted identities are ignored in the Java 2 platform.
0N/A.TP 3
0N/A4.
0N/AOnly trusted identities can be imported into Java 2 SDK keystores.
0N/A.RE
0N/A
0N/A.LP
0N/A.SH "SEE ALSO"
0N/A.LP
0N/A.RS 3
0N/A.TP 2
0N/Ao
1178N/Ajar(1) tool documentation
0N/A.TP 2
0N/Ao
1178N/Akeytool(1) tool documentation
0N/A.TP 2
0N/Ao
0N/Athe
0N/A.na
0N/A\f4Security\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/tutorial/security/index.html trail of the
0N/A.na
0N/A\f4Java Tutorial\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/tutorial/index.html for examples of the use of the \f3jarsigner\fP tool
0N/A.RE
0N/A
0N/A.LP
0N/A