60 /** the digests in use for a given entry*/ 61 ArrayList<MessageDigest> digests; 62 63 /** the manifest hashes for the digests in use */ 64 ArrayList<byte[]> manifestHashes; 65 66 private String name = null; 67 private Manifest man; 68 69 private boolean skip = true; 70 71 private JarEntry entry; 72 73 private CodeSigner[] signers = null; 74 75 /** 76 * Create a new ManifestEntryVerifier object. 77 */ 78 public ManifestEntryVerifier(Manifest man) 79 { 80 createdDigests = new HashMap<String, MessageDigest>(11); 81 digests = new ArrayList<MessageDigest>(); 82 manifestHashes = new ArrayList<byte[]>(); 83 this.man = man; 84 } 85 86 /** 87 * Find the hashes in the 88 * manifest for this entry, save them, and set the MessageDigest 89 * objects to calculate the hashes on the fly. If name is 90 * null it signifies that update/verify should ignore this entry. 91 */ 92 public void setEntry(String name, JarEntry entry) 93 throws IOException 94 { 95 digests.clear(); 96 manifestHashes.clear(); 97 this.name = name; 98 this.entry = entry; 99 100 skip = true; 101 signers = null; 102 | 60 /** the digests in use for a given entry*/ 61 ArrayList<MessageDigest> digests; 62 63 /** the manifest hashes for the digests in use */ 64 ArrayList<byte[]> manifestHashes; 65 66 private String name = null; 67 private Manifest man; 68 69 private boolean skip = true; 70 71 private JarEntry entry; 72 73 private CodeSigner[] signers = null; 74 75 /** 76 * Create a new ManifestEntryVerifier object. 77 */ 78 public ManifestEntryVerifier(Manifest man) 79 { 80 createdDigests = new HashMap<>(11); 81 digests = new ArrayList<>(); 82 manifestHashes = new ArrayList<>(); 83 this.man = man; 84 } 85 86 /** 87 * Find the hashes in the 88 * manifest for this entry, save them, and set the MessageDigest 89 * objects to calculate the hashes on the fly. If name is 90 * null it signifies that update/verify should ignore this entry. 91 */ 92 public void setEntry(String name, JarEntry entry) 93 throws IOException 94 { 95 digests.clear(); 96 manifestHashes.clear(); 97 this.name = name; 98 this.entry = entry; 99 100 skip = true; 101 signers = null; 102 |