java.lang.Object | |
↳ | sun.tools.jar.SignatureFile |
A signature file as defined in the Manifest and Signature Format. It has essentially the same structure as a Manifest file in that it is a set of RFC 822 headers (sections). The first section contains meta data relevant to the entire file (i.e "Signature-Version:1.0") and each subsequent section contains data relevant to specific entries: entry sections.
Each entry section contains the name of an entry (which must have a counterpart in the manifest). Like the manifest it contains a hash, the hash of the manifest section correspondind to the name. Since the manifest entry contains the hash of the data, this is equivalent to a signature of the data, plus the attributes of the manifest entry.
This signature file format deal with PKCS7 encoded DSA signature block. It should be straightforward to extent to support other algorithms.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Signature file corresponding to a given
Manifest.
| |||||||||||
Constructs a new Signature file corresponding to a given
Manifest.
| |||||||||||
Construct a Signature file from an input stream.
| |||||||||||
Construct a Signature file from an input stream.
| |||||||||||
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a set of entries from the current manifest.
| |||||||||||
Add a specific entry from the current manifest.
| |||||||||||
Returns an enumeration of the entries.
| |||||||||||
Returns the n-th entry.
| |||||||||||
Returns the signature block associated with this file.
| |||||||||||
Returns the name of the block file, ending with a block suffix
such as ".DSA".
| |||||||||||
Get the entry corresponding to a given name.
| |||||||||||
Returns the name of the signature file, ending with a ".SF"
suffix
| |||||||||||
Sets the signature block associated with this file.
| |||||||||||
Add a signature file at current position in a stream
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a new Signature file corresponding to a given Manifest. All entries in the manifest are signed.
manifest | the manifest to use. |
---|---|
name | for this signature file. This should be less than 8 characters, and without a suffix (i.e. without a period in it. |
JarException | if an invalid name is passed in. |
---|
Constructs a new Signature file corresponding to a given Manifest. Specific entries in the manifest are signed.
manifest | the manifest to use. |
---|---|
entries | the entries to sign. |
filename | for this signature file. This should be less than 8 characters, and without a suffix (i.e. without a period in it. |
JarException | if an invalid name is passed in. |
---|
Construct a Signature file from an input stream.
IOException | if an invalid name is passed in or if a stream exception occurs. |
---|
Construct a Signature file from an input stream.
IOException | if an invalid name is passed in or if a stream exception occurs. |
---|
Add a set of entries from the current manifest.
JarException |
---|
Returns the name of the block file, ending with a block suffix such as ".DSA".
Get the entry corresponding to a given name. Returns null if the entry does not exist.
Add a signature file at current position in a stream
IOException |
---|