RFR: 8333772: Incorrect Kerberos behavior when udp_preference_limit = 0

2024-06-10 Thread Weijun Wang
Allow `udp_preference_limit = 0` to force TCP. The reason for this bug is that it was read in a similar way as `kdc_timeout` and `max_retries`, both must be positive to have effect. - Commit messages: - the fix Changes: https://git.openjdk.org/jdk/pull/19638/files Webrev:

Re: RFR: 8333772: Incorrect Kerberos behavior when udp_preference_limit = 0

2024-06-10 Thread Weijun Wang
On Mon, 10 Jun 2024 20:29:54 GMT, Weijun Wang wrote: > Allow `udp_preference_limit = 0` to force TCP. > > The reason for this bug is that it was read in a similar way as `kdc_timeout` > and `max_retries`, both must be positive to have effect. This code change introduce a beh

Re: RFR: 8333046: Clean codes in sun.security.util.math

2024-05-31 Thread Weijun Wang
On Tue, 28 May 2024 14:42:13 GMT, John Jiang wrote: > A simple cleanup on the changes introduced by JDK-8329538. Looks good. Thanks for the cleanup. - Marked as reviewed by weijun (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19429#pullrequestreview-2090895326

Integrated: 8331975: Enable case-insensitive check in ccache and keytab entry lookup

2024-05-23 Thread Weijun Wang
On Mon, 13 May 2024 14:34:41 GMT, Weijun Wang wrote: > Add a new system property to control the name comparison in keytab and ccache > entry lookup. This pull request has now been integrated. Changeset: da3001da Author:Weijun Wang URL: https://git.openjdk.org/jdk/

Re: RFR: 8331975: Enable case-insensitive check in ccache and keytab entry lookup [v3]

2024-05-21 Thread Weijun Wang
On Tue, 21 May 2024 17:47:47 GMT, Valerie Peng wrote: > Changes look good to me. Thanks~ Thanks a lot! Can you please also review the CSR? - PR Comment: https://git.openjdk.org/jdk/pull/19216#issuecomment-2123163145

Re: RFR: 8331975: Enable case-insensitive check in ccache and keytab entry lookup [v3]

2024-05-20 Thread Weijun Wang
> Add a new system property to control the name comparison in keytab and ccache > entry lookup. Weijun Wang has updated the pull request incrementally with two additional commits since the last revision: - remove commented out code but leave comment - fast fail and no need to chec

Re: RFR: 8331975: Enable case-insensitive check in ccache and keytab entry lookup [v2]

2024-05-20 Thread Weijun Wang
On Mon, 20 May 2024 22:36:54 GMT, Valerie Peng wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> enhance test > > src/java.security.jgss/share/classes/sun/security/krb5/PrincipalNa

Re: RFR: 8331975: Enable case-insensitive check in ccache and keytab entry lookup [v2]

2024-05-20 Thread Weijun Wang
> Add a new system property to control the name comparison in keytab and ccache > entry lookup. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: enhance test - Changes: - all: https://git.openjdk.org/jdk/pull

Re: RFR: 8331975: Enable case-insensitive check in ccache and keytab entry lookup

2024-05-20 Thread Weijun Wang
On Mon, 20 May 2024 16:11:35 GMT, Mark Powers wrote: > Are there any existing interoperability tests? Not with real KDCs, but I can probably enhance the test to cover the case when this prop is not set. > src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java > line 634: >

Re: RFR: 8332492: Mark CAInterop.java#globalsigne46 as intermittent

2024-05-18 Thread Weijun Wang
On Sat, 18 May 2024 13:01:30 GMT, SendaoYan wrote: > > Is there a related bug on the intermittent failure? > > I have reportd the itermittent failure > [JDK-8332433](https://bugs.openjdk.org/browse/JDK-8332433), and > [JDK-8316138](https://bugs.openjdk.org/browse/JDK-8316138) is subtask of >

Re: RFR: 8332492: Mark CAInterop.java#globalsigne46 as intermittent

2024-05-18 Thread Weijun Wang
On Sat, 18 May 2024 12:34:39 GMT, SendaoYan wrote: > Hi all, > Before `CAInterop.java#globalsigne46` imtermittent failure has been > resolved, mark the test as intermittent. Is there a related bug on the intermittent failure? - PR Comment:

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v77]

2024-05-16 Thread Weijun Wang
On Wed, 15 May 2024 19:59:59 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-15 Thread Weijun Wang
On Fri, 10 May 2024 14:00:55 GMT, Weijun Wang wrote: >> Add `Cipher::export` API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > change new method to non final I don't think KDF API is needed for a

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-15 Thread Weijun Wang
On Fri, 10 May 2024 14:00:55 GMT, Weijun Wang wrote: >> Add `Cipher::export` API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > change new method to non final As for the cart and horse order, I thin

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-15 Thread Weijun Wang
On Fri, 10 May 2024 14:00:55 GMT, Weijun Wang wrote: >> Add `Cipher::export` API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > change new method to non final I haven't started JDK-8325548 yet since

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-14 Thread Weijun Wang
On Fri, 10 May 2024 14:00:55 GMT, Weijun Wang wrote: >> Add `Cipher::export` API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > change new method to non final I don't think it's worth inventing a new

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v65]

2024-05-14 Thread Weijun Wang
On Tue, 14 May 2024 22:14:47 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v44]

2024-05-14 Thread Weijun Wang
On Mon, 13 May 2024 23:11:45 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v44]

2024-05-14 Thread Weijun Wang
On Mon, 13 May 2024 23:11:45 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v34]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 23:08:41 GMT, Kevin Driver wrote: >> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java >> line 81: >> >>> 79: * if the initialization parameters are inappropriate for this >>> {@code KDFSpi} >>> 80: */ >>> 81: protected

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v34]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 22:34:04 GMT, Kevin Driver wrote: >> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java >> line 237: >> >>> 235: } catch (InvalidKeyException ike) { >>> 236: throw new InvalidParameterSpecException( >>> 237:

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v35]

2024-05-13 Thread Weijun Wang
On Fri, 10 May 2024 20:54:45 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java line 47: >> >>> 45: final class Builder { >>> 46: >>> 47: Extract extract = null; >> >> No need to store an `extract` field. Just create one and return it

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v33]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 17:37:38 GMT, Sean Mullan wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update @return statement > > src/java.base/share/classes/javax/crypto/KDFSpi.java line 72: > >> 70: protected

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v28]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 09:31:53 GMT, Alan Bateman wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> re-enable preview annotations > > src/java.base/share/classes/javax/crypto/KDFSpi.java line 41: > >> 39: * All the

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v34]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 19:01:09 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

RFR: 8331975: Enable case-insensitive check in ccache and keytab entry lookup

2024-05-13 Thread Weijun Wang
Add a new system property to control the name comparison in keytab and ccache entry lookup. - Commit messages: - year - the commit Changes: https://git.openjdk.org/jdk/pull/19216/files Webrev: https://webrevs.openjdk.org/?repo=jdk=19216=00 Issue:

Re: RFR: 8331008: KDF Implementation (Preview) [v28]

2024-05-13 Thread Weijun Wang
On Fri, 10 May 2024 20:55:47 GMT, Kevin Driver wrote: >> I agree. Also, if we do want to validate arguments (and I don't know if we >> need to), then I think the `Extract` constructor should be responsible for >> doing that, not the `Builder`. Doing it in `Extract` is safer since it is >>

Re: RFR: 8331008: KDF Implementation (Preview) [v26]

2024-05-13 Thread Weijun Wang
On Sun, 12 May 2024 14:43:04 GMT, Sean Mullan wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> commenting out until better understood -- causing failures > > src/java.base/share/classes/javax/crypto/KDF.java line

Re: RFR: 8331008: KDF Implementation (Preview) [v28]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 09:18:55 GMT, Alan Bateman wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> re-enable preview annotations > > src/java.base/share/classes/javax/crypto/KDF.java line 50: > >> 48: * {@code KDF}

Re: RFR: 8331008: KDF Implementation (Preview) [v28]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 03:46:50 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8332102: Add `@since` to package-info of `jdk.security.jarsigner`

2024-05-13 Thread Weijun Wang
On Sat, 11 May 2024 16:01:34 GMT, Nizar Benalla wrote: > Code cleanup. The package was added back in > [8056174](https://bugs.openjdk.org/browse/JDK-8056174). > Thanks to anyone reviewing this change. I split my changes into 1 PR per > module to make reviewing simpler. LGTM. Thanks!

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3]

2024-05-13 Thread Weijun Wang
On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and

Re: RFR: 8331008: KDF Implementation (Preview) [v26]

2024-05-12 Thread Weijun Wang
On Sun, 12 May 2024 14:39:40 GMT, Sean Mullan wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> commenting out until better understood -- causing failures > > src/java.base/share/classes/javax/crypto/KDF.java line

Re: RFR: 8331008: KDF Implementation (Preview) [v26]

2024-05-12 Thread Weijun Wang
On Sat, 11 May 2024 02:06:09 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-11 Thread Weijun Wang
On Fri, 10 May 2024 14:00:55 GMT, Weijun Wang wrote: >> Add `Cipher::export` API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > change new method to non final In fact, the original definition of ex

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-11 Thread Weijun Wang
On Fri, 10 May 2024 14:00:55 GMT, Weijun Wang wrote: >> Add `Cipher::export` API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > change new method to non final I don't know if any AES cipher defin

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-10 Thread Weijun Wang
On Fri, 10 May 2024 14:00:55 GMT, Weijun Wang wrote: >> Add `Cipher::export` API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > change new method to non final One use case for this method is HPKE

Re: RFR: 8325513: Export method for Cipher [v3]

2024-05-10 Thread Weijun Wang
> Add `Cipher::export` API. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: change new method to non final - Changes: - all: https://git.openjdk.org/jdk/pull/18409/files - new: https://git.openjdk.org/jdk/pull/18

Re: RFR: 8325513: Export method for Cipher [v2]

2024-05-10 Thread Weijun Wang
On Fri, 10 May 2024 13:08:00 GMT, Alan Bateman wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> rename > > src/java.base/share/classes/javax/crypto/Cipher.java line 2625: >

Re: RFR: 8325513: Export method for Cipher [v2]

2024-05-10 Thread Weijun Wang
> Add `Cipher::export` API. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: rename - Changes: - all: https://git.openjdk.org/jdk/pull/18409/files - new: https://git.openjdk.org/jdk/pull/18409/files/8834f04e..b8658

Re: RFR: 8325513: Export method for Cipher

2024-05-10 Thread Weijun Wang
On Fri, 10 May 2024 12:58:06 GMT, Sean Mullan wrote: >> Add `Cipher::export` API. > > src/java.base/share/classes/javax/crypto/Cipher.java line 2625: > >> 2623: * @since 23 >> 2624: */ >> 2625: public final SecretKey export(byte[] context, String algorithm, >> int length) { > >

RFR: 8325513: Export method for Cipher

2024-05-10 Thread Weijun Wang
Add `Cipher::export` API. - Commit messages: - Merge branch 'master' into 8325513 - make test work - Add test - Wording - Wording - relax requirement - wording - the fix Changes: https://git.openjdk.org/jdk/pull/18409/files Webrev:

Re: RFR: 8331008: KDF Implementation [v4]

2024-05-09 Thread Weijun Wang
On Fri, 10 May 2024 00:15:32 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: KDF Implementation [v3]

2024-05-09 Thread Weijun Wang
On Thu, 9 May 2024 19:46:39 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: KDF Implementation [v3]

2024-05-09 Thread Weijun Wang
On Thu, 9 May 2024 19:46:39 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: KDF Implementation [v3]

2024-05-09 Thread Weijun Wang
On Thu, 9 May 2024 20:19:41 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> some code review comments > > src/java.base/share/classes/com/sun/crypto/provider/Hkd

Re: RFR: 8331008: KDF Implementation [v3]

2024-05-09 Thread Weijun Wang
On Thu, 9 May 2024 19:46:39 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: KDF Implementation [v2]

2024-05-09 Thread Weijun Wang
On Thu, 9 May 2024 16:19:36 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: KDF Implementation [v2]

2024-05-09 Thread Weijun Wang
On Thu, 9 May 2024 16:19:36 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). > > Kevin Driver has updated the

Re: RFR: 8331008: KDF Implementation

2024-05-09 Thread Weijun Wang
On Tue, 23 Apr 2024 20:42:51 GMT, Kevin Driver wrote: > Introduce an API for Key Derivation Functions (KDFs), which are cryptographic > algorithms for deriving additional keys from a secret key and other data. See > [JEP 478](https://openjdk.org/jeps/478). Some comments on

Re: RFR: 8331008: KDF Implementation

2024-05-09 Thread Weijun Wang
On Tue, 23 Apr 2024 20:42:51 GMT, Kevin Driver wrote: > Introduce an API for Key Derivation Functions (KDFs), which are cryptographic > algorithms for deriving additional keys from a secret key and other data. See > [JEP 478](https://openjdk.org/jeps/478). Two comments on HKDF: 1. Expand

Integrated: 8331864: Update Public Suffix List to 1cbd6e7

2024-05-07 Thread Weijun Wang
On Tue, 7 May 2024 17:08:46 GMT, Weijun Wang wrote: > Update PSL to the latest upstream version. This pull request has now been integrated. Changeset: b9108334 Author: Weijun Wang URL: https://git.openjdk.org/jdk/commit/b91083341aba952befadd79020079920f9540999 Stats: 568 li

RFR: 8331864: Update Public Suffix List to 1cbd6e7

2024-05-07 Thread Weijun Wang
Update PSL to the latest upstream version. - Commit messages: - the change Changes: https://git.openjdk.org/jdk/pull/19127/files Webrev: https://webrevs.openjdk.org/?repo=jdk=19127=00 Issue: https://bugs.openjdk.org/browse/JDK-8331864 Stats: 568 lines in 5 files changed: 408

Re: RFR: 8319332: Security properties files inclusion [v13]

2024-05-03 Thread Weijun Wang
On Thu, 2 May 2024 21:24:19 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v12]

2024-05-02 Thread Weijun Wang
On Thu, 2 May 2024 20:34:22 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v11]

2024-05-02 Thread Weijun Wang
On Thu, 2 May 2024 19:06:00 GMT, Weijun Wang wrote: >> Francisco Ferrari Bihurriet has updated the pull request incrementally with >> one additional commit since the last revision: >> >> Profiles documentation adjustments. >> >> Co-authored-by:

Re: RFR: 8319332: Security properties files inclusion [v11]

2024-05-02 Thread Weijun Wang
On Thu, 2 May 2024 16:45:09 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v10]

2024-05-02 Thread Weijun Wang
On Thu, 2 May 2024 14:07:13 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v10]

2024-05-02 Thread Weijun Wang
On Thu, 2 May 2024 14:07:13 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v10]

2024-05-02 Thread Weijun Wang
On Thu, 2 May 2024 14:07:13 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v9]

2024-05-01 Thread Weijun Wang
On Tue, 23 Apr 2024 17:19:55 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes

Re: RFR: 8319332: Security properties files inclusion [v9]

2024-05-01 Thread Weijun Wang
On Tue, 23 Apr 2024 17:19:55 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes

Re: RFR: 8319332: Security properties files inclusion [v9]

2024-05-01 Thread Weijun Wang
On Tue, 23 Apr 2024 17:19:55 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes

Re: RFR: 8319332: Security properties files inclusion [v9]

2024-05-01 Thread Weijun Wang
On Tue, 23 Apr 2024 17:19:55 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes

Re: RFR: 8319332: Security properties files inclusion [v9]

2024-05-01 Thread Weijun Wang
On Tue, 23 Apr 2024 17:19:55 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes

Re: RFR: 8293345: SunPKCS11 provider checks on PKCS11 Mechanism are problematic [v2]

2024-05-01 Thread Weijun Wang
On Mon, 8 Apr 2024 19:33:25 GMT, Valerie Peng wrote: >> Existing legacy mechanism check disables mechanism(s) when the support is >> partial, e.g. supports decryption but not encryption, or supports >> verification but not signing. Some mechanisms can be used for both >> encryption/decryption

Re: RFR: 8319332: Security properties files inclusion [v8]

2024-04-22 Thread Weijun Wang
On Mon, 22 Apr 2024 20:42:44 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes

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

2024-04-19 Thread Weijun Wang
On Fri, 19 Apr 2024 18:51:32 GMT, MustavData wrote: >> @rebarbora-mckvak Can you please update [this >> test](https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/mscapi/AllTypes.java)? >> There is no need for the `hasAdminPrivileges` flag now. > > @wangweij , your [comment on >

Re: RFR: 8319332: Security properties files inclusion [v7]

2024-04-19 Thread Weijun Wang
On Wed, 6 Mar 2024 12:19:14 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v7]

2024-04-19 Thread Weijun Wang
On Fri, 19 Apr 2024 13:31:42 GMT, Francisco Ferrari Bihurriet wrote: >> Oh, I meant the final `else`. What does it mean if a file is neither >> "regular" nor "directory"? Also I don't quite understand why one uses >> `toRealPath` and one uses `toAbsolutePath`. Is this related to resolving a

Re: RFR: 8319332: Security properties files inclusion [v7]

2024-04-19 Thread Weijun Wang
On Fri, 19 Apr 2024 13:02:03 GMT, Francisco Ferrari Bihurriet wrote: > > > Is it worth breaking such invalid URLs? I'm just not sure about the compatibility impact. The example "file:///C:\some\path\extra.properties" you gave looks quite innocent and could be generated by a casual script.

Re: RFR: 8319332: Security properties files inclusion [v7]

2024-04-19 Thread Weijun Wang
On Fri, 19 Apr 2024 12:58:32 GMT, Francisco Ferrari Bihurriet wrote: >> src/java.base/share/classes/java/security/Security.java line 256: >> >>> 254: } else if (Files.isDirectory(path)) { >>> 255: throw new IOException("Is a directory"); >>> 256: } else

Re: RFR: 8328864: NullPointerException in sun.security.jca.ProviderList.getService() [v2]

2024-04-17 Thread Weijun Wang
On Wed, 17 Apr 2024 19:14:30 GMT, Ben Perez wrote: >> Updated `getService` to check whether `getProvider` returns null when >> checking for preferred providers and `continue` the loop if that is the >> case. Added `NullPreferredList` test. > > Ben Perez has updated the pull request with a new

Re: RFR: 8319332: Security properties files inclusion [v7]

2024-04-17 Thread Weijun Wang
On Wed, 6 Mar 2024 12:19:14 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8319332: Security properties files inclusion [v7]

2024-04-17 Thread Weijun Wang
On Wed, 6 Mar 2024 12:19:14 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

Re: RFR: 8328864: NullPointerException in sun.security.jca.ProviderList.getService()

2024-04-17 Thread Weijun Wang
On Thu, 11 Apr 2024 16:29:00 GMT, Ben Perez wrote: > Updated `getService` to check whether `getProvider` returns null when > checking for preferred providers and `continue` the loop if that is the case. > Added `NullPreferredList` test. The change looks good, just some tiny comments. Also,

Re: RFR: 8328864: NullPointerException in sun.security.jca.ProviderList.getService()

2024-04-17 Thread Weijun Wang
On Thu, 11 Apr 2024 16:29:00 GMT, Ben Perez wrote: > Updated `getService` to check whether `getProvider` returns null when > checking for preferred providers and `continue` the loop if that is the case. > Added `NullPreferredList` test. test/jdk/sun/security/jca/app-security.properties line

Re: RFR: 8330133: libj2pkcs11.so crashes on some pkcs#11 v3.0 libraries [v2]

2024-04-16 Thread Weijun Wang
On Tue, 16 Apr 2024 17:21:11 GMT, Valerie Peng wrote: >> It is reported that some PKCS#11 library/vendor reports major version 3, but >> doesn't implement the C_GetInterface function and the resulting 'interface' >> variable value may be NULL and cause unexpected crash later. >> >> This PR

Re: RFR: 8330133: libj2pkcs11.so crashes on some pkcs#11 v3.0 libraries

2024-04-16 Thread Weijun Wang
On Tue, 16 Apr 2024 00:15:34 GMT, Valerie Peng wrote: > It is reported that some PKCS#11 library/vendor reports major version 3, but > doesn't implement the C_GetInterface function and the resulting 'interface' > variable value may be NULL and cause unexpected crash later. > > This PR would

Integrated: 8307143: CredentialsCache.cacheName should not be static

2024-04-15 Thread Weijun Wang
On Sun, 30 Apr 2023 13:03:38 GMT, Weijun Wang wrote: > The CC can be loaded with any file and its name is not static. > > `MemoryCredentialsCache` is removed since it's not used anywhere. We've > already supported native ccache reading directly with JNI method &g

Re: RFR: 8307143: CredentialsCache.cacheName should not be static [v5]

2024-04-15 Thread Weijun Wang
> The CC can be loaded with any file and its name is not static. > > `MemoryCredentialsCache` is removed since it's not used anywhere. We've > already supported native ccache reading directly with JNI method > `Credentials::acquireDefaultNativeCreds`. Weijun Wang has updated t

Re: RFR: 8307143: CredentialsCache.cacheName should not be static [v4]

2024-04-12 Thread Weijun Wang
> The CC can be loaded with any file and its name is not static. > > `MemoryCredentialsCache` is removed since it's not used anywhere. We've > already supported native ccache reading directly with JNI method > `Credentials::acquireDefaultNativeCreds`. Weijun Wang has updated t

Re: RFR: 8307143: CredentialsCache.cacheName should not be static [v3]

2024-04-12 Thread Weijun Wang
> The CC can be loaded with any file and its name is not static. > > `MemoryCredentialsCache` is removed since it's not used anywhere. We've > already supported native ccache reading directly with JNI method > `Credentials::acquireDefaultNativeCreds`. Weijun Wang has updated t

Re: RFR: 8307143: CredentialsCache.cacheName should not be static [v2]

2024-04-12 Thread Weijun Wang
> The CC can be loaded with any file and its name is not static. > > `MemoryCredentialsCache` is removed since it's not used anywhere. We've > already supported native ccache reading directly with JNI method > `Credentials::acquireDefaultNativeCreds`. Weijun Wang has updated t

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

2024-04-11 Thread Weijun Wang
On Wed, 10 Apr 2024 13:09:37 GMT, rebarbora-mckvak wrote: >> Yes it's self signed one. >> >> No it's not added to any other keystore. When I said >> "TrustedCertificateEntry" it's only because in a Java KeyStore an entry with >> only a certificate is called a TrustedCertificateEntry. >> >>

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

2024-04-11 Thread Weijun Wang
On Thu, 11 Apr 2024 07:57:12 GMT, Bernd wrote: >> rebarbora-mckvak has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8313367: copyright updated > > Did you test with CNG keys as well? Using the new providers is much more > important

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

2024-04-10 Thread Weijun Wang
On Wed, 10 Apr 2024 20:46:20 GMT, rebarbora-mckvak wrote: >> src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp line 807: >> >>> 805: // Acquire an alternative CSP handle >>> 806: if (::CryptAcquireContext(, LPCSTR(pbData), >>> NULL, //deprecated >>> 807:

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

2024-04-10 Thread Weijun Wang
On Wed, 10 Apr 2024 21:10:16 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 [v4]

2024-04-10 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 [v4]

2024-04-10 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: JDK-8328501 Incorrect @since` tags for java security interfaces [v3]

2024-04-09 Thread Weijun Wang
On Tue, 9 Apr 2024 23:19:53 GMT, Jonathan Gibbons wrote: >> Nizar Benalla has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update copyright year to 2024 > > [wangweij](https://github.com/wangweij) commented [3 weeks >

Re: RFR: 8320219: Actually resolve issues with goto labels in sspi [v12]

2024-04-09 Thread Weijun Wang
On Fri, 5 Apr 2024 06:31:16 GMT, Julian Waters wrote: >> I regret not actually addressing the issues with the goto labels in >> https://github.com/openjdk/jdk/pull/15996, where initialization of locals in >> sspi were jumped over by gotos to a certain label. I changed the >> initializations

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

2024-04-09 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: 8328785: IOException: Symbol not found: C_GetInterface for PKCS11 interface prior to V3.0 [v4]

2024-04-08 Thread Weijun Wang
On Tue, 9 Apr 2024 00:02:33 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

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

2024-04-08 Thread Weijun Wang
On Thu, 4 Apr 2024 21:23:25 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

Re: RFR: 8200566: DistributionPointFetcher fails to fetch CRLs if the DistributionPoints field contains more than one DistributionPoint and the first one fails [v3]

2024-04-08 Thread Weijun Wang
On Mon, 8 Apr 2024 12:41:23 GMT, Sean Mullan wrote: >> Please review this change which fixes an issue in revocation checking of >> CRLs. A certificate's CRL Distribution Points extension can contain multiple >> Distribution Points (DPs), and each DP can contain one or more references to >> a

Re: RFR: 8200566: DistributionPointFetcher fails to fetch CRLs if the DistributionPoints field contains more than one DistributionPoint and the first one fails [v2]

2024-04-05 Thread Weijun Wang
On Fri, 5 Apr 2024 13:48:24 GMT, Sean Mullan wrote: >> Please review this change which fixes an issue in revocation checking of >> CRLs. A certificate's CRL Distribution Points extension can contain multiple >> Distribution Points (DPs), and each DP can contain one or more references to >> a

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 >>

Re: RFR: 8051959: Add thread and timestamp options to java.security.debug system property [v5]

2024-03-29 Thread Weijun Wang
On Fri, 29 Mar 2024 15:09:50 GMT, Sean Coffey wrote: >> Proposal to improve the `java.security.debug` output so that options exist >> to add thread ID, thread name, source of log record and a timestamp >> information to the output. >> >> examples: >> format without patch : >> >> >>

  1   2   3   4   5   6   7   8   9   10   >