--- old/src/share/classes/sun/security/util/SignatureFileVerifier.java Wed Feb 13 17:06:59 2013 +++ new/src/share/classes/sun/security/util/SignatureFileVerifier.java Wed Feb 13 17:06:58 2013 @@ -35,7 +35,7 @@ import java.util.jar.*; import sun.security.pkcs.*; -import sun.misc.BASE64Decoder; +import java.util.Base64; import sun.security.jca.Providers; @@ -220,7 +220,6 @@ name); } - BASE64Decoder decoder = new BASE64Decoder(); CodeSigner[] newSigners = getSigners(infos, block); @@ -232,10 +231,10 @@ sf.getEntries().entrySet().iterator(); // see if we can verify the whole manifest first - boolean manifestSigned = verifyManifestHash(sf, md, decoder, manifestDigests); + boolean manifestSigned = verifyManifestHash(sf, md, manifestDigests); // verify manifest main attributes - if (!manifestSigned && !verifyManifestMainAttrs(sf, md, decoder)) { + if (!manifestSigned && !verifyManifestMainAttrs(sf, md)) { throw new SecurityException ("Invalid signature file digest for Manifest main attributes"); } @@ -247,7 +246,7 @@ String name = e.getKey(); if (manifestSigned || - (verifySection(e.getValue(), name, md, decoder))) { + (verifySection(e.getValue(), name, md))) { if (name.startsWith("./")) name = name.substring(2); @@ -275,7 +274,6 @@ */ private boolean verifyManifestHash(Manifest sf, ManifestDigester md, - BASE64Decoder decoder, List manifestDigests) throws IOException { @@ -297,7 +295,7 @@ if (digest != null) { byte[] computedHash = md.manifestDigest(digest); byte[] expectedHash = - decoder.decodeBuffer((String)se.getValue()); + Base64.getMimeDecoder().decode((String)se.getValue()); if (debug != null) { debug.println("Signature File: Manifest digest " + @@ -320,8 +318,7 @@ } private boolean verifyManifestMainAttrs(Manifest sf, - ManifestDigester md, - BASE64Decoder decoder) + ManifestDigester md) throws IOException { Attributes mattr = sf.getMainAttributes(); @@ -342,7 +339,7 @@ md.get(ManifestDigester.MF_MAIN_ATTRS, false); byte[] computedHash = mde.digest(digest); byte[] expectedHash = - decoder.decodeBuffer((String)se.getValue()); + Base64.getMimeDecoder().decode((String)se.getValue()); if (debug != null) { debug.println("Signature File: " + @@ -387,8 +384,7 @@ private boolean verifySection(Attributes sfAttr, String name, - ManifestDigester md, - BASE64Decoder decoder) + ManifestDigester md) throws IOException { boolean oneDigestVerified = false; @@ -418,7 +414,7 @@ boolean ok = false; byte[] expected = - decoder.decodeBuffer((String)se.getValue()); + Base64.getMimeDecoder().decode((String)se.getValue()); byte[] computed; if (workaround) { computed = mde.digestWorkaround(digest);