[9] RFR: 8144539: Update PKCS11 tests to run with security manager
Artem Smotrakov
artem.smotrakov at oracle.com
Wed Jan 6 20:39:02 UTC 2016
Hello,
Please review this enhancement for PKCS11 tests which updates them to
run with both enabled and disable security manager.
Tests enable a security manager before running actual test cases for
each particular security provider, and disable it when the test cases
finish. This helps to avoid granting lots of permissions because
PKCS11Test class does some initialization which accesses some protected
operations.
There also are several updates:
- tests run in a separate JVM since PKCS11Test class modifies system
properties, adds and removes security providers (even if a security
manager is not set)
- added new policy files (some tests need a separate policy file since
they require some extra permissions, but I wouldn't add them for all tests)
- updated the code to use try-with-resources blocks where possible
- replaced Vector with ArrayList since it doesn't seem to need
synchronization
- removed using internal sun.security.util.ECUtil class
- some cosmetic changes
I have run the updated tests on all supported generic platforms, they
seem to work fine.
Bug: https://bugs.openjdk.java.net/browse/JDK-8144539
Webrev: http://cr.openjdk.java.net/~asmotrak/8144539/webrev.01/
Artem
More information about the security-dev
mailing list