RFR: 8328785: IOException: Symbol not found: C_GetInterface for PKCS11 interface prior to V3.0 [v2]

Daniel Jeliński djelinski at openjdk.org
Thu Apr 4 06:27:09 UTC 2024


On Thu, 4 Apr 2024 02:39:28 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> This PR fixes a problem regarding the usage of dlerror() where an earlier error message causes a premature error out. Added extra code to clear out earlier error message and made minor code refactoring.
>> 
>> No regression test as this can't be reproduced using the NSS library from artifactory and thus the noreg-hard label.
>> 
>> Thanks!
>
> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review comments

LGTM. One nit, feel free to ignore.

src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.c line 181:

> 179:     C_GetFunctionList = (CK_C_GetFunctionList) dlsym(hModule,
> 180:             getFunctionListStr);
> 181:     if ((systemErrorMessage = dlerror()) != NULL){

Would it make sense to move this check under `if (C_GetFunctionList == NULL)`? If `C_GetFunctionList` is non-null, do we care about the value of dlerror?

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

Marked as reviewed by djelinski (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18588#pullrequestreview-1978836653
PR Review Comment: https://git.openjdk.org/jdk/pull/18588#discussion_r1550994849



More information about the security-dev mailing list