[libbluray-devel] BDJSecurityManager: allow creating javax.crypto.JceSecurityManager

hpi1 git at videolan.org
Thu May 19 15:06:03 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed May 18 13:16:17 2016 +0300| [3ccf2cd515049a13e18cbd0be43783079907c43a] | committer: hpi1

BDJSecurityManager: allow creating javax.crypto.JceSecurityManager

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=3ccf2cd515049a13e18cbd0be43783079907c43a
---

 src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java b/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
index 8a337ee..ba48bda 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
@@ -68,6 +68,12 @@ final class BDJSecurityManager extends SecurityManager {
     public void checkPermission(Permission perm) {
         if (perm instanceof RuntimePermission) {
             if (perm.implies(new RuntimePermission("createSecurityManager"))) {
+
+                // allow initializing of javax.crypto.JceSecurityManager
+                if (classDepth("javax.crypto.JceSecurityManager") < 3) {
+                    return;
+                }
+
                 deny(perm);
             }
             if (perm.implies(new RuntimePermission("setSecurityManager"))) {



More information about the libbluray-devel mailing list