[jdk17u-dev] RFR: 8341927: Replace hardcoded security providers with new test.provider.name system property
Goetz Lindenmaier
goetz at openjdk.org
Mon Nov 18 13:30:04 UTC 2024
I backport this for parity with Oracle 17.0.14. The backport is based on the commit to 21.
Tests passed including win tests. Three files are not real tests, I double-checked these.
I had to resolve a lot of files, but all except three only differed in the Copyright year.
Resolved files
================
doc/testing.html
Resolved. Context differences.
test/jdk/com/sun/crypto/provider/Cipher/KeyWrap/TestCipherKeyWrapperTest.java
test/jdk/com/sun/crypto/provider/Cipher/PBE/DecryptWithoutParameters.java
test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEInvalidParamsTest.java
test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEKeysAlgorithmNames.java
test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEParametersTest.java
test/jdk/com/sun/crypto/provider/Cipher/PBE/PBESealedObject.java
test/jdk/com/sun/crypto/provider/Cipher/PBE/TestCipherKeyWrapperPBEKey.java
test/jdk/com/sun/crypto/provider/KeyGenerator/Test4628062.java
test/jdk/com/sun/crypto/provider/Mac/HmacPBESHA1.java
test/jdk/com/sun/crypto/provider/Mac/HmacSaltLengths.java
test/jdk/com/sun/crypto/provider/Mac/MacClone.java
test/jdk/com/sun/crypto/provider/NSASuiteB/TestHmacSHAOids.java
All these test lack 8288050: Add support of SHA-512/224 and SHA-512/256 to the PBKDF2 and PBES2 impls in SunJCE provider
All only Copyright except for
DecryptWithoutParameters.java: Test in 17 has less and other test cases, adapted change to this.
test/jdk/com/sun/crypto/provider/Cipher/KeyWrap/TestGeneral.java
Test was modified in 18 by 8271745: Correct block size for KW,KWP mode and use fixed IV for KWP mode for SunJCE
Test in 17 has other test cases, adapted change to this.
test/jdk/com/sun/crypto/provider/Cipher/KeyWrap/TestKeySizeCheck.java
Test was modified in 8302225: SunJCE Provider doesn't validate key sizes when using 'constrained' transforms for AES/KW and AES/KWP
Backport started.
Resolved Copyright.
test/jdk/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java
Modified in 19 by 8267319: Use larger default key sizes and algorithms based on CNSA
Resolved Copyright.
test/jdk/com/sun/jdi/ClassesByName2Test.java
Modified by virtual threads changes.
Resolved Copyright.
test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetAlgName.java
Modified in 20 by 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters. This is a follow-up of a cleanup change also in 20.
Resolved Copyright.
Files not in 17
===============
test/jdk/com/sun/crypto/provider/KeyGenerator/Test6227536.java
This test came in 20 with 6227536: KeyGenerator.init() methods do not throw IllegalArgumentException for keysize == 0
Not a candidate for backport.
test/jdk/sun/security/ec/ECDSAPrimitive.java
Depends on 8333754: Add a Test against ECDSA and ECDH NIST Test vector
which is a candidate for backport, but it's not trivial to do so.
I would like to proceed with this change, anyways.
test/jdk/sun/security/ec/ECDSAPrvGreaterThanOrder.java
This test came in 18 with 8272385: Enforce ECPrivateKey d value to be in the range [1, n-1] for SunEC provider
Not a candidate for backport. Throws new exception.
test/jdk/sun/security/ec/OidInstance.java
This test came in 19 with 8279801: EC KeyFactory and KeyPairGenerator do not have aliases for OID format
Hmm, I think this would be nice-to-have in 17. It's not
critical. But I don't want to drive this now.
test/jdk/sun/security/pkcs11/Cipher/KeyWrap/NISTWrapKAT.java
test/jdk/sun/security/pkcs11/Cipher/KeyWrap/TestGeneral.java
Both came in 18 with 8264849: Add KW and KWP support to PKCS11 provider.
Seems to be a follow-up Enhancement enabled by a change that came in 17.
test/jdk/sun/security/pkcs11/Cipher/PBECipher.java
test/jdk/sun/security/pkcs11/Mac/PBAMac.java
Both came in 21 with 8301553: Support Password-Based Cryptography in SunPKCS11
Not a candidate for backport.
-------------
Commit messages:
- Backport 9bdf2a619d1d158d6c1e8e1e1238a4229e0b0783
Changes: https://git.openjdk.org/jdk17u-dev/pull/3049/files
Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3049&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8341927
Stats: 970 lines in 222 files changed: 294 ins; 0 del; 676 mod
Patch: https://git.openjdk.org/jdk17u-dev/pull/3049.diff
Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3049/head:pull/3049
PR: https://git.openjdk.org/jdk17u-dev/pull/3049
More information about the jdk-updates-dev
mailing list