jdk-24/test/jdk/sun/security/pkcs11
Sean Mullan db85090553 8338411: Implement JEP 486: Permanently Disable the Security Manager
Co-authored-by: Sean Mullan <mullan@openjdk.org>
Co-authored-by: Alan Bateman <alanb@openjdk.org>
Co-authored-by: Weijun Wang <weijun@openjdk.org>
Co-authored-by: Aleksei Efimov <aefimov@openjdk.org>
Co-authored-by: Brian Burkhalter <bpb@openjdk.org>
Co-authored-by: Daniel Fuchs <dfuchs@openjdk.org>
Co-authored-by: Harshitha Onkar <honkar@openjdk.org>
Co-authored-by: Joe Wang <joehw@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Justin Lu <jlu@openjdk.org>
Co-authored-by: Kevin Walls <kevinw@openjdk.org>
Co-authored-by: Lance Andersen <lancea@openjdk.org>
Co-authored-by: Naoto Sato <naoto@openjdk.org>
Co-authored-by: Roger Riggs <rriggs@openjdk.org>
Co-authored-by: Brent Christian <bchristi@openjdk.org>
Co-authored-by: Stuart Marks <smarks@openjdk.org>
Co-authored-by: Ian Graves <igraves@openjdk.org>
Co-authored-by: Phil Race <prr@openjdk.org>
Co-authored-by: Erik Gahlin <egahlin@openjdk.org>
Co-authored-by: Jaikiran Pai <jpai@openjdk.org>
Reviewed-by: kevinw, aivanov, rriggs, lancea, coffeys, dfuchs, ihse, erikj, cjplummer, coleenp, naoto, mchung, prr, weijun, joehw, azvegint, psadhukhan, bchristi, sundar, attila
2024-11-12 17:16:15 +00:00
..
Cipher 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
Config 8321713: Harmonize executeTestJvm with create[Limited]TestJavaProcessBuilder 2024-01-03 08:53:01 +00:00
ec 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
KeyAgreement 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
KeyGenerator 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
KeyPairGenerator 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
KeyStore 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
Mac 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
MessageDigest 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
nss 8313575: Refactor PKCS11Test tests 2023-09-05 23:08:25 +00:00
Provider 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
rsa 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
Secmod 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
SecretKeyFactory 8301553: Support Password-Based Cryptography in SunPKCS11 2023-06-06 19:39:34 +00:00
SecureRandom 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
Serialize 8164639: Configure PKCS11 tests to use user-supplied NSS libraries 2018-08-15 18:41:18 +08:00
Signature 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
sslecc 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
tls 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
PKCS11Test.java 8338411: Implement JEP 486: Permanently Disable the Security Manager 2024-11-12 17:16:15 +00:00
PSSUtil.java 8312428: PKCS11 tests fail with NSS 3.91 2023-08-29 22:08:34 +00:00
README 8295343: sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer 2023-11-22 13:00:56 +00:00
SampleTest.java 8164639: Configure PKCS11 tests to use user-supplied NSS libraries 2018-08-15 18:41:18 +08:00
SecmodTest.java 8296631: NSS tests failing on OL9 linux-aarch64 hosts 2023-10-02 22:43:48 +00:00

This README is to keep a list facts and known workaround for the pkcs11 java tests
perform as a result of bugs or features in NSS or other pkcs11 libraries.

- How to get NSS libraries?
The libraries come from the following sources.

1. Specified by system property jdk.test.lib.artifacts.<NAME>
The system property, jdk.test.lib.artifacts.<NAME>, can specify an absolute path
to the local NSS library directory. The <NAME> component should be replaced with
the name element of the appropriate @Artifact class.
(See `test/jdk/sun/security/pkcs11/PKCS11Test.java`)

2. Pre-built NSS libraries from artifactory server
If the value of system property jdk.test.lib.artifacts.<NAME> is not set, the
tests will try to download pre-built NSS libraries from artifactory server.
Please note that JIB jar MUST be present in classpath when downloading the
libraries.

3. System NSS libraries
If both of the above sources are not available, the tests will try to search
for the libraries in some system paths. The paths are platform-specific. Note
that, there is no such system path on Windows and MacOSX platforms. On these
platforms, it has to use source 1 or 2.

- NSS ECC None/Basic/Extended
The tests detect the NSS library support for Elliptic Curves as to not
report incorrect failures.  PKCS11 reports back CKR_DOMAIN_PARAMS_INVALID
when the curve is not supported.

- Default libsoftokn3.so
By default PKCS11Test.java will look for libsoftokn3.so. There are a number of
tests, particularly in Secmod, that need libnss3.so.  The method useNSS() in
PKCS11test.java is to change the search and version checking to libnss3.

ECC Basic supports is secp256r1, secp384r1, and secp521r1.

- A bug in NSS 3.12 (Mozilla bug 471665) causes AES key lengths to be
read incorrectly. KeyStore/SecretKeysBasic.java tiggers this bug and
knows to avoid it.

- A number of EC tests fail because of a DER bug in NSS 3.11. The best guess
is Mozilla bug 480280.  Those tests that abort execution with a PASS result
are:  TestECDH2, TestECDSA, TestECDSA2 and TestECGenSpec.