[RFR] [8u] 8144539: Update PKCS11 tests to run with security manager

Andrew Hughes gnu.andrew at redhat.com
Sat Aug 22 01:41:42 UTC 2020


Bug: https://bugs.openjdk.java.net/browse/JDK-8144539
Webrev: https://cr.openjdk.java.net/~andrew/openjdk8/8144539/webrev.01/

This fix expands the test coverage of the PKCS#11 provider, as well as
doing a fair amount of cleanup on the tests, which will help later
backports.

Changes from the 9u version:

* test/sun/security/pkcs11/KeyAgreement/TestDH.java:
Changes already introduced by JDK-8185292: "Stricter key generation"

* test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java:
Copyright header already has a later date.

* test/sun/security/pkcs11/PKCS11Test.java:
Copyright header already has a later date.
The presence of JDK-8186098:
"sun/security/pkcs11/KeyStore/SecretKeysBasic.sh failed due to libnss3
version cannot be parsed" requires additional imports and causes
differences inside the try block.
The isBadSolarisSparc method, badSolarisSparc variable and change to
the getDistro() method are not required as 8u does not have
JDK-8133318: "Exclude intermittent failing PKCS11 tests on Solaris
SPARC 11.1 and earlier"
Format of "Completed test with provider" line differed due to lack of
JDK-7191662: "JCE providers should be located via ServiceLoader"

* test/sun/security/pkcs11/Secmod/AddPrivateKey.java,
test/sun/security/pkcs11/Secmod/Crypto.java and
test/sun/security/pkcs11/Secmod/GetPrivateKey.java don't expect
the randomness tag added by JDK-8078334, though other files do.

* test/sun/security/pkcs11/Secmod/TrustAnchors.java,
test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java:
Differing copyright headers.

* test/sun/security/pkcs11/Signature/ByteBuffers.java,
test/sun/security/pkcs11/Signature/TestDSA.java,
test/sun/security/pkcs11/Signature/TestDSAKeyLength.java,
test/sun/security/pkcs11/Signature/TestRSAKeyLength.java,
test/sun/security/pkcs11/ec/TestCurves.java,
test/sun/security/pkcs11/ec/TestECDSA.java,
test/sun/security/pkcs11/rsa/TestCACerts.java,
test/sun/security/pkcs11/rsa/TestSignatures.java:
Differing copyright headers.
JDK-8133318 not present in 8u.
No @modules line in 8u (for TestCurves)

* test/sun/security/pkcs11/ec/TestECDH2.java,
test/sun/security/pkcs11/ec/TestECDSA2.java,
test/sun/security/pkcs11/fips/TrustManagerTest.java,
test/sun/security/pkcs11/tls/TestKeyMaterial.java,
test/sun/security/pkcs11/tls/TestMasterSecret.java,
test/sun/security/pkcs11/tls/TestPRF.java,
test/sun/security/pkcs11/tls/TestPremaster.java:
No @modules line in 8u (for TestCurves)

* test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java:
@run line sets -Djdk.tls.namedGroups in 8u and already sets
jdk.tls.disabledAlgorithms & jdk.certpath.disabledAlgorithms

Ok for 8u?

Thanks,
-- 
Andrew :)

Senior Free Java Software Engineer
OpenJDK Package Owner
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222


More information about the jdk8u-dev mailing list