AppletLoader: validate certificate for native files before attempting to extract them.

This commit is contained in:
kappa1 2011-06-15 21:15:58 +00:00
parent 1929c3be5d
commit 96648a6fad

View file

@ -1662,6 +1662,9 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
InputStream in = jarFile.getInputStream(jarFile.getEntry(entry.getName()));
OutputStream out = new FileOutputStream(path + "natives" + File.separator + entry.getName());
// validate if the certificate for native file is correct before extracting
validateCertificateChain(certificate, entry.getCertificates());
int bufferSize;
byte buffer[] = new byte[65536];
@ -1675,9 +1678,6 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
subtaskMessage = "Extracting: " + entry.getName() + " " + ((currentSizeExtract * 100) / totalSizeExtract) + "%";
}
// validate if the certificate for native file is correct
validateCertificateChain(certificate, entry.getCertificates());
in.close();
out.close();
}