提交 99d10947 编写于 作者: M mullan

6994263: Untrusted code can replace JRE's XML DSig Transform or C14N algorithm implementations

Reviewed-by: xuelei
上级 198c02c6
......@@ -210,6 +210,8 @@ public final class Transform extends SignatureElementProxy {
public static void init() {
if (!alreadyInitialized) {
transformClassHash = new HashMap(10);
// make sure builtin algorithms are all registered first
com.sun.org.apache.xml.internal.security.Init.init();
alreadyInitialized = true;
}
}
......@@ -236,12 +238,7 @@ public final class Transform extends SignatureElementProxy {
"algorithm.alreadyRegistered", exArgs);
}
ClassLoader cl = (ClassLoader) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return Thread.currentThread().getContextClassLoader();
}
});
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
transformClassHash.put
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册