3990N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class is used to verify each entry in a jar file with its 3224N/A * Holder class to lazily load Sun provider. NOTE: if 3224N/A * Providers.getSunProvider returned a cached provider, we could avoid the 3224N/A * need for caching the provider with this holder class; we should try to 0N/A /** the created digest objects */ 0N/A /** the digests in use for a given entry*/ 0N/A /** the manifest hashes for the digests in use */ 0N/A * Create a new ManifestEntryVerifier object. 0N/A * Find the hashes in the 0N/A * manifest for this entry, save them, and set the MessageDigest 0N/A * objects to calculate the hashes on the fly. If name is 0N/A /* get the headers from the manifest for this entry */ 0N/A /* if there aren't any, we can't verify any digests for this entry */ 0N/A // ugh. we should be able to remove this at some point. 0N/A // there are broken jars floating around with ./name and /name 0N/A // in the manifest, and "name" in the zip/jar file. 0N/A // 7 is length of "-Digest" 0N/A * update the digests for the digests we are interested in 0N/A * update the digests for the digests we are interested in 0N/A * get the JarEntry for this object 0N/A * go through all the digests, calculating the final digest 0N/A * and comparing it to the one in the manifest. If this is 0N/A * the first time we have verified this object, remove its 0N/A * code signers from sigFileSigners and place in verifiedSigners. 0N/A // take it out of sigFileSigners and put it in verifiedSigners... 0N/A // for the toHex function 0N/A {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'a',
'b',
'c',
'd',
'e',
'f'};
0N/A * convert a byte array to a hex string for debugging purposes 0N/A * @param data the binary data to be converted to a hex string 0N/A * @return an ASCII hex string