Removed lib/security/local_policy.jar from vfs.zip (because OpenJDK builds the restricted version, by default) and instead make a vfs alias for it that points to the unrestricted US_export_policy.jar.

This commit is contained in:
jfrijters 2010-04-21 06:16:37 +00:00
Родитель 5cf23ddfc5
Коммит 5a91126566
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -131,7 +131,11 @@
<include name="lib/logging.properties" />
<include name="lib/security/java.policy" />
<include name="lib/security/java.security" />
<include name="lib/security/local_policy.jar" />
<!--
we don't add lib/security/local_policy.jar, because it is the restricted version,
instead we'll add a link in vfs from local_policy.jar to US_export_policy.jar
(because US_export_policy.jar is unrestricted)
-->
<include name="lib/security/US_export_policy.jar" />
</fileset>
<fileset basedir="${OpenJDK.dir}/jdk/src/windows">

Просмотреть файл

@ -240,12 +240,16 @@ namespace IKVM.Internal
// because that's the easiest way to construct a ZipFile from a Stream.
java.util.zip.ZipFile zf = new java.util.zip.ZipFile(RootPath + "vfs.zip");
java.util.Enumeration e = zf.entries();
char sep = java.io.File.separatorChar;
while (e.hasMoreElements())
{
AddZipEntry(zf, root, (java.util.zip.ZipEntry)e.nextElement());
}
// make "lib/security/local_policy.jar" point to "lib/security/US_export_policy.jar"
// to get the unrestricted crypto policy
VfsDirectory security = (VfsDirectory)((VfsDirectory)root.GetEntry("lib")).GetEntry("security");
security.Add("local_policy.jar", security.GetEntry("US_export_policy.jar"));
Interlocked.CompareExchange(ref VirtualFileSystem.root, root, null);
}