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

2024-04-03 Thread Daniel Jeliński
On Thu, 4 Apr 2024 02:39:28 GMT, Valerie Peng 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 t

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

2024-04-03 Thread Valerie Peng
> 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 > artifa

Re: RFR: 8313367: SunMSCAPI cannot read Local Computer certs w/o Windows elevation [v4]

2024-04-03 Thread Weijun Wang
On Fri, 22 Mar 2024 22:25:47 GMT, rebarbora-mckvak wrote: >> This fixes the defect described at >> https://bugs.openjdk.org/browse/JDK-8313367 >> >> If the process does not have write permissions, the store is opened as >> read-only (instead of failing). >> >> Please note that permissions to

Re: RFR: 8313367: SunMSCAPI cannot read Local Computer certs w/o Windows elevation

2024-04-03 Thread Weijun Wang
On Fri, 22 Mar 2024 18:43:11 GMT, MustavData wrote: >> I also noticed a different problem. No matter if privileged or unprivileged, >> `keytool -genkeypair -storetype Windows-My-LOCALMACHINE` works successfully >> but the entries are actually created in Windows-MY-CURRENTUSER. This is >> unrel

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

2024-04-03 Thread Valerie Peng
On Wed, 3 Apr 2024 18:18:37 GMT, Daniel Jeliński wrote: >> We do have checks for jGetFunctionList != NULL before calling >> ReleaseStringUTFChars() with it. So, this shouldn't be an issue? > > this will be an issue if `jGetFunctionList != NULL` and `dlopen` fails, > resulting in `goto cleanup`

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

2024-04-03 Thread Valerie Peng
On Wed, 3 Apr 2024 18:16:48 GMT, Daniel Jeliński wrote: >> Not really, the intention is to continue with the C_GetFunctionList (or the >> method named by "getFunctionListStr"). > > if that's the intention, then you shouldn't be using `ckAssertReturnValueOK`, > which throws an exception if `rv`

Re: RFR: 8328318: Wrong description in X509Extension.getExtensionValue method javadoc [v2]

2024-04-03 Thread Ben Perez
> Removed `PrivateKeyUsagePeriod` from method javadoc and added several > commonly used extensions Ben Perez has updated the pull request incrementally with one additional commit since the last revision: Updated copyright - Changes: - all: https://git.openjdk.org/jdk/pull/1856

Re: RFR: 8328318: Wrong description in X509Extension.getExtensionValue method javadoc

2024-04-03 Thread Sean Mullan
On Mon, 1 Apr 2024 17:39:07 GMT, Ben Perez wrote: > Removed `PrivateKeyUsagePeriod` from method javadoc and added several > commonly used extensions Looks good other than the copyright date. - Marked as reviewed by mullan (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18

Re: RFR: 8328318: Wrong description in X509Extension.getExtensionValue method javadoc

2024-04-03 Thread Sean Mullan
On Mon, 1 Apr 2024 17:39:07 GMT, Ben Perez wrote: > Removed `PrivateKeyUsagePeriod` from method javadoc and added several > commonly used extensions src/java.base/share/classes/java/security/cert/X509Extension.java line 1: > 1: /* Update the copyright date to 2024. - PR Review C

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

2024-04-03 Thread Daniel Jeliński
On Wed, 3 Apr 2024 18:11:34 GMT, Valerie Peng wrote: >> src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.c line 94: >> >>> 92: char *systemErrorMessage; >>> 93: char *exceptionMessage; >>> 94: const char *getFunctionListStr = "C_GetFunctionList"; >> >> If this value ever gets

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

2024-04-03 Thread Valerie Peng
On Wed, 3 Apr 2024 08:49:01 GMT, Daniel Jeliński 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 a

Re: RFR: 8328318: Wrong description in X509Extension.getExtensionValue method javadoc

2024-04-03 Thread Rajan Halade
On Mon, 1 Apr 2024 17:39:07 GMT, Ben Perez wrote: > Removed `PrivateKeyUsagePeriod` from method javadoc and added several > commonly used extensions /request_review @seanjmullan - PR Comment: https://git.openjdk.org/jdk/pull/18565#issuecomment-2035269620

Integrated: 8328957: Update PKCS11Test.java to not use hardcoded path

2024-04-03 Thread Matthew Donovan
On Tue, 26 Mar 2024 14:02:27 GMT, Matthew Donovan 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,

Integrated: JDK-8327474 Review use of java.io.tmpdir in jdk tests

2024-04-03 Thread Bill Huang
On Mon, 18 Mar 2024 16:47:24 GMT, Bill Huang wrote: > This task addresses an essential aspect of our testing infrastructure: the > proper handling and cleanup of temporary files and socket files created > during test execution. The motivation behind these changes is to prevent the > accumulati

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

2024-04-03 Thread Rajan Halade
On Tue, 26 Mar 2024 17:48:49 GMT, Matthew Donovan 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

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-03 Thread Magnus Ihse Bursie
On Tue, 2 Apr 2024 19:19:59 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark(algorithm) (dataSize) (keyLength) >> (provider) Mode Cnt ScoreError Units >> SignatureBench.ECDSA.signSHA256withECDSA1024 256 >

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

2024-04-03 Thread Daniel Jeliński
On Wed, 3 Apr 2024 01:11:47 GMT, Valerie Peng 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 c