| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private ByteArrayOutputStream | |
| pack-priv static final Debug | |
| private volatile ManifestDigester | manDig
The ManifestDigester object |
| private List | manifestDigests
collect -DIGEST-MANIFEST values for deny list |
| pack-priv final String | manifestName
the manifest name this JarVerifier is created upon |
| pack-priv byte[] | manifestRawBytes
the bytes for the manDig object |
| public static final String | |
| private boolean | |
| private boolean | |
| private ArrayList | pendingBlocks
"queue" of pending PKCS7 blocks that we couldn't parse until we parsed the .SF file |
| private Hashtable | |
| private Hashtable | |
| private List | |
| private Map | |
| private Hashtable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | beginEntry(JarEntry je, ManifestEntryVerifier mev)
This method scans to see which entry we're parsing and keeps various state information depending on what type of file is being parsed. |
| pack-priv void | doneWithMeta()
called to let us know we have processed all the META-INF entries, and if we re-read one of them, don't re-process it. |
| public Certificate[] | |
| public CodeSigner[] | |
| pack-priv boolean | |
| private static Certificate[] | |
| pack-priv boolean | |
| private void | processEntry(ManifestEntryVerifier mev)
called when we reach the end of entry in one of the read() methods. |
| public void | |
| public void |
| anyToVerify | back to summary |
|---|---|
| private boolean anyToVerify | |
| baos | back to summary |
|---|---|
| private ByteArrayOutputStream baos | |
| debug | back to summary |
|---|---|
| pack-priv static final Debug debug | |
| manDig | back to summary |
|---|---|
| private volatile ManifestDigester manDig The ManifestDigester object | |
| manifestDigests | back to summary |
|---|---|
| private List<Object> manifestDigests collect -DIGEST-MANIFEST values for deny list | |
| manifestName | back to summary |
|---|---|
| pack-priv final String manifestName the manifest name this JarVerifier is created upon | |
| manifestRawBytes | back to summary |
|---|---|
| pack-priv byte[] manifestRawBytes the bytes for the manDig object | |
| MULTIPLE_MANIFEST_WARNING | back to summary |
|---|---|
| public static final String MULTIPLE_MANIFEST_WARNING | |
| parsingBlockOrSF | back to summary |
|---|---|
| private boolean parsingBlockOrSF | |
| parsingMeta | back to summary |
|---|---|
| private boolean parsingMeta | |
| pendingBlocks | back to summary |
|---|---|
| private ArrayList<SignatureFileVerifier> pendingBlocks "queue" of pending PKCS7 blocks that we couldn't parse until we parsed the .SF file | |
| sigFileData | back to summary |
|---|---|
| private Hashtable<String, byte[]> sigFileData | |
| sigFileSigners | back to summary |
|---|---|
| private Hashtable<String, CodeSigner[]> sigFileSigners | |
| signerCache | back to summary |
|---|---|
| private List<CodeSigner[]> signerCache | |
| signersToAlgs | back to summary |
|---|---|
| private Map<CodeSigner[], Map<String, Boolean>> signersToAlgs | |
| verifiedSigners | back to summary |
|---|---|
| private Hashtable<String, CodeSigner[]> verifiedSigners | |
| JarVerifier | back to summary |
|---|---|
| public JarVerifier(String name, byte[] rawBytes) | |
| beginEntry | back to summary |
|---|---|
| public void beginEntry(JarEntry je, ManifestEntryVerifier mev) throws IOException This method scans to see which entry we're parsing and keeps various state information depending on what type of file is being parsed. | |
| doneWithMeta | back to summary |
|---|---|
| pack-priv void doneWithMeta() called to let us know we have processed all the META-INF entries, and if we re-read one of them, don't re-process it. Also gets rid of any data structures we needed when parsing META-INF entries. | |
| getCerts | back to summary |
|---|---|
| public Certificate[] getCerts(JarEntry entry) Return an array of Certificate objects for the given file in the jar. | |
| getCodeSigners | back to summary |
|---|---|
| public CodeSigner[] getCodeSigners(JarEntry entry) return an array of CodeSigner objects for the given file in the jar. this array is not cloned. | |
| isTrustedManifestEntry | back to summary |
|---|---|
| pack-priv boolean isTrustedManifestEntry(String name) Returns whether the name is trusted. Used by
| |
| mapSignersToCertArray | back to summary |
|---|---|
| private static Certificate[] mapSignersToCertArray(CodeSigner[] signers) | |
| nothingToVerify | back to summary |
|---|---|
| pack-priv boolean nothingToVerify() returns true if there no files to verify. should only be called after all the META-INF entries have been processed. | |
| processEntry | back to summary |
|---|---|
| private void processEntry(ManifestEntryVerifier mev) throws IOException called when we reach the end of entry in one of the read() methods. | |
| update | back to summary |
|---|---|
| public void update(int b, ManifestEntryVerifier mev) throws IOException update a single byte. | |
| update | back to summary |
|---|---|
| public void update(int n, byte[] b, int off, int len, ManifestEntryVerifier mev) throws IOException update an array of bytes. | |
| Modifier and Type | Field and Description |
|---|---|
| private InputStream | |
| private JarVerifier | |
| private ManifestEntryVerifier | |
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private void | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[] b, int off, int len)
Overrides java. Reads up to |
| is | back to summary |
|---|---|
| private InputStream is | |
| jv | back to summary |
|---|---|
| private JarVerifier jv | |
| mev | back to summary |
|---|---|
| private ManifestEntryVerifier mev | |
| numLeft | back to summary |
|---|---|
| private long numLeft | |
| VerifierStream | back to summary |
|---|---|
| pack-priv VerifierStream(Manifest man, JarEntry je, InputStream is, JarVerifier jv) throws IOException | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| ensureOpen | back to summary |
|---|---|
| private void ensureOpen() throws IOException | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |