com.ibm.security12.sun.security.util
Class ManifestEntryVerifier
java.lang.Object
|
+--com.ibm.security12.sun.security.util.ManifestEntryVerifier
- public class ManifestEntryVerifier
- extends Object
This class is used to verify each entry in a jar file with its
manifest value.
Method Summary |
JarEntry |
getEntry()
get the JarEntry for this object |
void |
setEntry(String name,
JarEntry entry)
Find the hashes in the
manifest for this entry, save them, and set the MessageDigest
objects to calculate the hashes on the fly. |
void |
update(byte buffer)
update the digests for the digests we are interested in |
void |
update(byte[] buffer,
int off,
int len)
update the digests for the digests we are interested in |
Certificate[] |
verify(Hashtable verifiedCerts,
Hashtable sigFileCerts)
go through all the digests, calculating the final digest
and comparing it to the one in the manifest. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ManifestEntryVerifier
public ManifestEntryVerifier(Manifest man)
- Create a new ManifestEntryVerifier object.
setEntry
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
public void update(byte buffer)
- update the digests for the digests we are interested in
update
public void update(byte[] buffer,
int off,
int len)
- update the digests for the digests we are interested in
getEntry
public JarEntry getEntry()
- get the JarEntry for this object
verify
public Certificate[] verify(Hashtable verifiedCerts,
Hashtable sigFileCerts)
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
Certs from sigFileCerts and place in verifiedCerts.