mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
More fixes
This commit is contained in:
1 parent
a26b495ef9
commit
bbe4b9fbc2
2 files changed
+9
-5
No files matched your search
@@ -20,7 +20,7 @@ import cpw.mods.fml.relauncher.RelaunchClassLoader;
|
||||
|
||||
public class FMLSanityChecker implements IFMLCallHook
|
||||
{
|
||||
private static final String FMLFINGERPRINT = "";
|
||||
private static final String FMLFINGERPRINT = "EE:E2:73:7A:8B:90:5F:7D:C6:02:D5:B7:23:9F:B6:29:C2:18:0F:3E".toLowerCase().replace(":","");
|
||||
static class MLDetectorClassVisitor extends ClassVisitor
|
||||
{
|
||||
private boolean foundMarker = false;
|
||||
@@ -56,8 +56,13 @@ public class FMLSanityChecker implements IFMLCallHook
|
||||
String fingerprint = CertificateHelper.getFingerprint(certificate);
|
||||
if (fingerprint.equals(FMLFINGERPRINT))
|
||||
{
|
||||
FMLLog.info("Found valid fingerprint for FML: %s", fingerprint);
|
||||
goodFML = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.severe("Found invalid fingerprint for FML: %s", fingerprint);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -118,7 +118,7 @@ public class RelaunchClassLoader extends URLClassLoader
|
||||
{
|
||||
CodeSigner[] signers = null;
|
||||
int lastDot = name.lastIndexOf('.');
|
||||
String pkgname = name.substring(0, lastDot);
|
||||
String pkgname = lastDot == -1 ? "" : name.substring(0, lastDot);
|
||||
String fName = name.replace('.', '/').concat(".class");
|
||||
String pkgPath = pkgname.replace('.', '/');
|
||||
URLConnection urlConnection = findCodeSourceConnectionFor(fName);
|
||||
@@ -131,13 +131,12 @@ public class RelaunchClassLoader extends URLClassLoader
|
||||
Manifest mf = jf.getManifest();
|
||||
JarEntry ent = jf.getJarEntry(fName);
|
||||
Package pkg = getPackage(pkgname);
|
||||
getClassBytes(name);
|
||||
signers = ent.getCodeSigners();
|
||||
if (pkg == null)
|
||||
{
|
||||
pkg = definePackage(pkgname, mf, jarUrlConn.getJarFileURL());
|
||||
packageManifests.put(pkg, mf);
|
||||
// need to read the bytes to force the signing to be checked
|
||||
getClassBytes(name);
|
||||
signers = ent.getCodeSigners();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user