mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-14 00:49:42 +00:00
8168851: Tighten permissions granted to the java.smartcardio module
Reviewed-by: vinnie, mchung
This commit is contained in:
parent
955f784be9
commit
dfbba1428e
@ -32,8 +32,22 @@ grant codeBase "jrt:/java.smartcardio" {
|
||||
permission javax.smartcardio.CardPermission "*", "*";
|
||||
permission java.lang.RuntimePermission "loadLibrary.j2pcsc";
|
||||
permission java.lang.RuntimePermission
|
||||
"accessClassInPackage.sun.security.*";
|
||||
permission java.util.PropertyPermission "*", "read";
|
||||
"accessClassInPackage.sun.security.jca";
|
||||
permission java.lang.RuntimePermission
|
||||
"accessClassInPackage.sun.security.util";
|
||||
permission java.util.PropertyPermission
|
||||
"javax.smartcardio.TerminalFactory.DefaultType", "read";
|
||||
permission java.util.PropertyPermission "os.name", "read";
|
||||
permission java.util.PropertyPermission "os.arch", "read";
|
||||
permission java.util.PropertyPermission "sun.arch.data.model", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"sun.security.smartcardio.library", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"sun.security.smartcardio.t0GetResponse", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"sun.security.smartcardio.t1GetResponse", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"sun.security.smartcardio.t1StripLe", "read";
|
||||
// needed for looking up native PC/SC library
|
||||
permission java.io.FilePermission "<<ALL FILES>>","read";
|
||||
permission java.security.SecurityPermission "putProviderProperty.SunPCSC";
|
||||
|
||||
@ -23,11 +23,12 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 6239117
|
||||
* @bug 6239117 8168851
|
||||
* @summary test logical channels work
|
||||
* @author Andreas Sterbenz
|
||||
* @modules java.smartcardio/javax.smartcardio
|
||||
* @run main/manual TestChannel
|
||||
* @run main/othervm/manual/java.security.policy==test.policy TestChannel
|
||||
*/
|
||||
|
||||
// This test requires special hardware.
|
||||
|
||||
@ -23,11 +23,12 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 6239117 6470320
|
||||
* @bug 6239117 6470320 8168851
|
||||
* @summary test if transmitControlCommand() works
|
||||
* @author Andreas Sterbenz
|
||||
* @modules java.smartcardio/javax.smartcardio
|
||||
* @run main/manual TestControl
|
||||
* @run main/othervm/manual/java.security.policy==test.policy TestControl
|
||||
*/
|
||||
|
||||
// This test requires special hardware.
|
||||
|
||||
@ -23,11 +23,12 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 6327047
|
||||
* @bug 6327047 8168851
|
||||
* @summary verify that TerminalFactory.getDefault() works
|
||||
* @author Andreas Sterbenz
|
||||
* @modules java.smartcardio/javax.smartcardio
|
||||
* @run main/manual TestDefault
|
||||
* @run main/othervm/manual/java.security.policy==test.policy TestDefault
|
||||
*/
|
||||
|
||||
// This test requires special hardware.
|
||||
|
||||
@ -23,10 +23,11 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8046343
|
||||
* @bug 8046343 8168851
|
||||
* @summary Make sure that direct protocol is available
|
||||
* @modules java.smartcardio/javax.smartcardio
|
||||
* @run main/manual TestDirect
|
||||
* @run main/othervm/manual/java.security.policy==test.policy TestDirect
|
||||
*/
|
||||
|
||||
// This test requires special hardware.
|
||||
|
||||
3
jdk/test/sun/security/smartcardio/test.policy
Normal file
3
jdk/test/sun/security/smartcardio/test.policy
Normal file
@ -0,0 +1,3 @@
|
||||
grant codebase "file:${test.classes}/*" {
|
||||
permission javax.smartcardio.CardPermission "*", "connect,getBasicChannel,reset,transmitControl";
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user