| Modifier and Type | Class and Description |
|---|---|
| private static class | ManifestEntryVerifier.
Holder class to lazily load Sun provider. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv HashMap | createdDigests
the created digest objects |
| private static final Debug | |
| pack-priv ArrayList | digests
the digests in use for a given entry |
| private JarEntry | |
| private final Manifest | |
| private final String | |
| pack-priv ArrayList | manifestHashes
the manifest hashes for the digests in use |
| private String | |
| private CodeSigner[] | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | ManifestEntryVerifier(Manifest man, String manifestFileName)
Create a new ManifestEntryVerifier object. |
| Modifier and Type | Method and Description |
|---|---|
| private static Map | algsPermittedStatusForSigners(Map<CodeSigner[], Map<String, Boolean>> signersToAlgs, CodeSigner[] signers)
|
| private boolean | |
| public JarEntry | |
| public void | |
| public void | |
| public void | |
| public CodeSigner[] | verify(Hashtable<String, CodeSigner[]> verifiedSigners, Hashtable<String, CodeSigner[]> sigFileSigners, Map<CodeSigner[], Map<String, Boolean>> signersToAlgs)
go through all the digests, calculating the final digest and comparing it to the one in the manifest. |
| createdDigests | back to summary |
|---|---|
| pack-priv HashMap<String, MessageDigest> createdDigests the created digest objects | |
| debug | back to summary |
|---|---|
| private static final Debug debug | |
| digests | back to summary |
|---|---|
| pack-priv ArrayList<MessageDigest> digests the digests in use for a given entry | |
| entry | back to summary |
|---|---|
| private JarEntry entry | |
| man | back to summary |
|---|---|
| private final Manifest man | |
| manifestFileName | back to summary |
|---|---|
| private final String manifestFileName | |
| manifestHashes | back to summary |
|---|---|
| pack-priv ArrayList<byte[]> manifestHashes the manifest hashes for the digests in use | |
| name | back to summary |
|---|---|
| private String name | |
| signers | back to summary |
|---|---|
| private CodeSigner[] signers | |
| skip | back to summary |
|---|---|
| private boolean skip | |
| ManifestEntryVerifier | back to summary |
|---|---|
| public ManifestEntryVerifier(Manifest man, String manifestFileName) Create a new ManifestEntryVerifier object. | |
| algsPermittedStatusForSigners | back to summary |
|---|---|
| private static Map | |
| checkConstraints | back to summary |
|---|---|
| private boolean checkConstraints(String algorithm, JarConstraintsParameters params) | |
| getEntry | back to summary |
|---|---|
| public JarEntry getEntry() get the JarEntry for this object | |
| setEntry | back to summary |
|---|---|
| public void setEntry(String name, JarEntry entry) throws IOException Find the hashes in the manifest for this entry, save them, and set the MessageDigest objects to calculate the hashes on the fly. If name is null it signifies that update/verify should ignore this entry. | |
| update | back to summary |
|---|---|
| public void update(byte buffer) update the digests for the digests we are interested in | |
| update | back to summary |
|---|---|
| public void update(byte[] buffer, int off, int len) update the digests for the digests we are interested in | |
| verify | back to summary |
|---|---|
| public CodeSigner[] verify(Hashtable<String, CodeSigner[]> verifiedSigners, Hashtable<String, CodeSigner[]> sigFileSigners, Map<CodeSigner[], Map<String, Boolean>> signersToAlgs) throws JarException go through all the digests, calculating the final digest and comparing it to the one in the manifest. If this is the first time we have verified this object, remove its code signers from sigFileSigners and place in verifiedSigners. | |
Note
if Providers.getSunProvider returned a cached provider, we could avoid the need for caching the provider with this holder class; we should try to revisit this in JDK 8.
| Access | Constructor and Description |
|---|---|
| private |
| instance | back to summary |
|---|---|
| private static final Provider instance | |
| SunProviderHolder | back to summary |
|---|---|
| private SunProviderHolder() | |