xjava.security
class IJCE_SecuritySupport extends Object
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.6 $
Since: Cryptix 2.2.2
Method Summary | |
---|---|
static void | checkPrivilegeEnabled(String targetname, int depth)
On VMs that support Netscape's PrivilegeManager extensions, this checks
that the security privilege with name targetname has been enabled. |
static void | checkPrivilegeEnabled(Target target, int depth)
On VMs that support Netscape's PrivilegeManager extensions, this checks
that the privilege given by target has been enabled. |
static void | checkPrivilegeEnabled(Target target, Object arg, int depth)
On VMs that support Netscape's PrivilegeManager extensions, this checks
that the privilege given by target, with parameter arg has
been enabled. |
static void | checkSystemCaller(int depth)
If a SecurityManager is installed, this method checks that there is no class
loaded by a ClassLoader in the previous depth stack frames. |
static Target | findTarget(String name)
Returns a Target that can be passed to
PrivilegeManager.enablePrivilege(...) , in order to request
permission for an action that requires the user's trust.
|
static Target | findTarget(String name, Object arg)
Reserved for future use, in case parameterized targets are needed. |
IJCE_SecuritySupport.checkSystemCaller(depth)
.
For example,
IJCE_SecuritySupport.checkPrivilegeEnabled("AddSecurityProvider", 1)
On Netscape this will check that the "AddSecurityProvider" privilege has been enabled. On other VMs it will check that either no security manager is installed, or the immediate caller is a system class.
IJCE_SecuritySupport.checkSystemCaller(depth)
.
For example,
IJCE_SecuritySupport.checkPrivilegeEnabled(target, 1)
On Netscape this will check that the target privilege has been enabled. On other VMs it will check that either no security manager is installed, or the immediate caller is a system class.
IJCE_SecuritySupport.checkSystemCaller(depth)
.
See Also: IJCE_SecuritySupport
For example,
IJCE_SecuritySupport.checkSystemCaller(1)
will check that either no security manager is installed, or the immediate caller is a system class.
PrivilegeManager.enablePrivilege(...)
, in order to request
permission for an action that requires the user's trust.
Parameters: name the name of the target to be returned
Returns: the Target object
Throws: ForbiddenTargetException if name is not recognized.
See Also: java.security.IJCE#findTarget(java.lang.String)
Parameters: name the name of the target to be returned arg a parameter object
Returns: the Target object
Throws: ForbiddenTargetException if name is not recognized.
See Also: java.security.IJCE#findTarget(java.lang.String, java.lang.Object)