author | xuelei |
Mon, 29 Jul 2019 11:23:49 -0700 | |
changeset 57585 | b20a319fdd35 |
parent 51460 | 97e361fe3433 |
permissions | -rw-r--r-- |
19067
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
1 |
This README is to keep a list facts and known workaround for the pkcs11 java tests |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
2 |
perform as a result of bugs or features in NSS or other pkcs11 libraries. |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
3 |
|
51460
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
4 |
- How to get NSS libraries? |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
5 |
The libraries come from the following sources. |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
6 |
|
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
7 |
1. Specified by system property test.nss.lib.paths |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
8 |
System property test.nss.lib.paths can specify a set of absolute paths to |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
9 |
the local NSS library directories. The paths are separated by comma. |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
10 |
|
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
11 |
2. Pre-built NSS libraries from artifactory server |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
12 |
If the value of system property test.nss.lib.paths is not set, the tests will try |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
13 |
to download pre-built NSS libraries from artifactory server. Currently, the |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
14 |
tests only looks for libraries for Windows and MacOSX platforms on artifactory. |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
15 |
Please note that JIB jar MUST be present in classpath when downloading the |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
16 |
libraries. |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
17 |
|
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
18 |
3. System NSS libraries |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
19 |
If both of the above sources are not available, the tests will try to search |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
20 |
for the libraries in some system paths. The paths are platform-specific. Note |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
21 |
that, there is no such system path on Windows and MacOSX platforms. On these |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
22 |
platforms, it has to use source 1 or 2. |
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
23 |
|
19067
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
24 |
- NSS ECC None/Basic/Extended |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
25 |
The tests detect the NSS library support for Elliptic Curves as to not |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
26 |
report incorrect failures. PKCS11 reports back CKR_DOMAIN_PARAMS_INVALID |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
27 |
when the curve is not supported. |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
28 |
|
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
29 |
- Default libsoftokn3.so |
51460
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
30 |
By default PKCS11Test.java will look for libsoftokn3.so. There are a number of |
19067
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
31 |
tests, particularly in Secmod, that need libnss3.so. The method useNSS() in |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
32 |
PKCS11test.java is to change the search and version checking to libnss3. |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
33 |
|
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
34 |
ECC Basic supports is secp256r1, secp384r1, and secp521r1. |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
35 |
|
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
36 |
- A bug in NSS 3.12 (Mozilla bug 471665) causes AES key lengths to be |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
37 |
read incorrectly. KeyStore/SecretKeysBasic.java tiggers this bug and |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
38 |
knows to avoid it. |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
39 |
|
51460
97e361fe3433
8164639: Configure PKCS11 tests to use user-supplied NSS libraries
jjiang
parents:
47216
diff
changeset
|
40 |
- A number of EC tests fail because of a DER bug in NSS 3.11. The best guess |
19067
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
41 |
is Mozilla bug 480280. Those tests that abort execution with a PASS result |
5271291b7121
8020424: The NSS version should be detected before running crypto tests
ascarpino
parents:
diff
changeset
|
42 |
are: TestECDH2, TestECDSA, TestECDSA2 and TestECGenSpec. |