8153545: sun/security/pkcs11/Provider/Login.sh fails on Linux
Reviewed-by: vinnie, weijun
This commit is contained in:
parent
dc0f21b366
commit
6edbf9b42d
@ -234,7 +234,7 @@ sun/security/pkcs11/MessageDigest/DigestKAT.java 8077138,8023434
|
||||
sun/security/pkcs11/MessageDigest/ReinitDigest.java 8077138,8023434 windows-all
|
||||
sun/security/pkcs11/MessageDigest/TestCloning.java 8077138,8023434 windows-all
|
||||
sun/security/pkcs11/Provider/ConfigQuotedString.sh 8077138,8023434 windows-all
|
||||
sun/security/pkcs11/Provider/Login.sh 8077138,8023434,8153545 windows-all,linux-all
|
||||
sun/security/pkcs11/Provider/Login.sh 8077138,8023434 windows-all
|
||||
sun/security/pkcs11/SampleTest.java 8077138,8023434 windows-all
|
||||
sun/security/pkcs11/Secmod/AddPrivateKey.java 8077138,8023434 windows-all
|
||||
sun/security/pkcs11/Secmod/AddTrustedCert.java 8077138,8023434 windows-all
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -103,7 +103,7 @@ public class Basic extends PKCS11Test {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
main(new Basic());
|
||||
main(new Basic(), args);
|
||||
}
|
||||
|
||||
public void main(Provider p) throws Exception {
|
||||
|
@ -7,6 +7,7 @@ grant {
|
||||
permission java.lang.RuntimePermission "loadLibrary.*";
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.*";
|
||||
permission java.lang.RuntimePermission "getProtectionDomain";
|
||||
permission java.lang.RuntimePermission "setSecurityManager";
|
||||
permission java.security.SecurityPermission "putProviderProperty.*";
|
||||
|
||||
permission java.io.FilePermission "<<ALL FILES>>", "read";
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -187,10 +187,8 @@ ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
|
||||
-DTEST=${TEST} \
|
||||
-Dtest.src=${TESTSRC} \
|
||||
-Dtest.classes=${TESTCLASSES} \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy=${TESTSRC}${FS}Basic.policy \
|
||||
-Djava.security.debug=${DEBUG} \
|
||||
Basic
|
||||
Basic sm Basic.policy
|
||||
|
||||
# save error status
|
||||
status=$?
|
||||
|
@ -155,10 +155,8 @@ ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
|
||||
-DNO_DEIMOS=true \
|
||||
-DTOKEN=solaris \
|
||||
-DTEST=${TEST} \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy=${TESTSRC}${FS}Basic.policy \
|
||||
-Djava.security.debug=${DEBUG} \
|
||||
Basic
|
||||
Basic sm Basic.policy
|
||||
|
||||
# clean up
|
||||
|
||||
|
@ -181,8 +181,13 @@ public abstract class PKCS11Test {
|
||||
|
||||
public static void main(PKCS11Test test, String[] args) throws Exception {
|
||||
if (args != null) {
|
||||
if (args.length > 0 && "sm".equals(args[0])) {
|
||||
test.enableSM = true;
|
||||
if (args.length > 0) {
|
||||
if ("sm".equals(args[0])) {
|
||||
test.enableSM = true;
|
||||
} else {
|
||||
throw new RuntimeException("Unknown Command, use 'sm' as "
|
||||
+ "first arguemtn to enable security manager");
|
||||
}
|
||||
}
|
||||
if (test.enableSM) {
|
||||
System.setProperty("java.security.policy",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -35,7 +35,7 @@ public class Login extends PKCS11Test {
|
||||
private static char[] password;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
main(new Login());
|
||||
main(new Login(), args);
|
||||
}
|
||||
|
||||
public void main(Provider p) throws Exception {
|
||||
|
@ -4,6 +4,7 @@ grant {
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.apple.*";
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.*";
|
||||
permission java.lang.RuntimePermission "getProtectionDomain";
|
||||
permission java.lang.RuntimePermission "setSecurityManager";
|
||||
permission java.security.SecurityPermission "putProviderProperty.*";
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -127,10 +127,8 @@ ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
|
||||
-DNO_DEIMOS=true \
|
||||
-Dtest.src=${TESTSRC} \
|
||||
-Dtest.classes=${TESTCLASSES} \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy=${TESTSRC}${FS}Login.policy \
|
||||
-Djava.security.debug=${DEBUG} \
|
||||
Login
|
||||
Login sm Login.policy
|
||||
|
||||
# save error status
|
||||
status=$?
|
||||
|
Loading…
x
Reference in New Issue
Block a user