RFR: 8328957: Update PKCS11Test.java to not use hardcoded path [v2]

Martin Balao mbalao at openjdk.org
Tue Mar 26 18:40:23 UTC 2024


On Tue, 26 Mar 2024 17:48:49 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

>> When resolving the location of the NSS library, the code appended a hard-coded path: `/nss/lib`. This makes it difficult for a person to specify the library when it is installed in a location such as `/usr/lib64`. 
>> 
>> In this PR, I removed the hard-coded path and updated the code to search the specified path for the nss library file, softokn3.
>
> Matthew Donovan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   added try-with-resources to Stream and cleaned up path logic

Looks good to me. I verified that it fixes the problem when running PKCS11 tests with system libraries (e.g. /usr/lib64).

-------------

Marked as reviewed by mbalao (Committer).

PR Review: https://git.openjdk.org/jdk/pull/18488#pullrequestreview-1961396374



More information about the security-dev mailing list