Re: RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key [v2]

2021-10-19 Thread Anthony Scarpino
On Tue, 19 Oct 2021 20:32:21 GMT, Sean Mullan wrote: >> This fix improves the exception message to better indicate when the key (and >> not the signature algorithm) is restricted. This change also includes a few >> other improvements: >> >> - The constraints checking in `AlgorithmChecker.check

RFR: 8225181: KeyStore should have a getAttributes method

2021-10-19 Thread Weijun Wang
Add `KeyStore::getAttributes` so that one can get the attributes of an entry without retrieving the entry first. This is especially useful for a private key entry which can only be retrieved with a password. - Commit messages: - 8225181: KeyStore should have a getAttributes method

Integrated: 8275003: Suppress warnings on non-serializable non-transient instance fields in windows mscapi

2021-10-19 Thread Joe Darcy
On Sat, 9 Oct 2021 19:41:51 GMT, Joe Darcy wrote: > Analogous to other recent cleanups like JDK-8274393, suppress warnings for > serialization-related issues in the windows mscapi code. This pull request has now been integrated. Changeset: 926966be Author:Joe Darcy URL: https://git

Integrated: 8264849: Add KW and KWP support to PKCS11 provider

2021-10-19 Thread Valerie Peng
On Fri, 17 Sep 2021 23:22:21 GMT, Valerie Peng wrote: > Anyone has time to review this RFE for adding AES cipher with KW, KWP modes > support to SunPKCS11 provider? > > The main changes are in only one new class, i.e. P11KeyWrapCipher.java, which > is the CipherSpi impl for the native PKCS11 k

Integrated: 8275252: Migrate cacerts from JKS to password-less PKCS12

2021-10-19 Thread Weijun Wang
On Thu, 14 Oct 2021 13:36:19 GMT, Weijun Wang wrote: > The cacerts file is now a password-less PKCS12 file. This make sure old code > that uses a JKS KeyStore object can continuously load it using a null > password (in fact, any password) and see all certificates inside. This pull request has

Re: RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key [v2]

2021-10-19 Thread Sean Mullan
> This fix improves the exception message to better indicate when the key (and > not the signature algorithm) is restricted. This change also includes a few > other improvements: > > - The constraints checking in `AlgorithmChecker.check()` has been improved. > If the `AlgorithmConstraints` are

Re: RFR: 8275252: Migrate cacerts from JKS to password-less PKCS12 [v2]

2021-10-19 Thread Weijun Wang
> The cacerts file is now a password-less PKCS12 file. This make sure old code > that uses a JKS KeyStore object can continuously load it using a null > password (in fact, any password) and see all certificates inside. Weijun Wang has updated the pull request incrementally with one additional c

Re: RFR: 8275252: Migrate cacerts from JKS to password-less PKCS12 [v2]

2021-10-19 Thread Weijun Wang
On Tue, 19 Oct 2021 18:49:11 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use a standard name > > make/jdk/src/classes/build/tools/generatecacerts/GenerateCacerts.java line 54: > >> 52: publ

Re: RFR: 8275252: Migrate cacerts from JKS to password-less PKCS12 [v2]

2021-10-19 Thread Sean Mullan
On Tue, 19 Oct 2021 19:48:23 GMT, Weijun Wang wrote: >> The cacerts file is now a password-less PKCS12 file. This make sure old code >> that uses a JKS KeyStore object can continuously load it using a null >> password (in fact, any password) and see all certificates inside. > > Weijun Wang has

Re: RFR: 8275003: Suppress warnings on non-serializable non-transient instance fields in windows mscapi

2021-10-19 Thread Valerie Peng
On Sat, 9 Oct 2021 19:41:51 GMT, Joe Darcy wrote: > Analogous to other recent cleanups like JDK-8274393, suppress warnings for > serialization-related issues in the windows mscapi code. Looks fine. Thanks! - Marked as reviewed by valeriep (Reviewer). PR: https://git.openjdk.java.

Re: RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key

2021-10-19 Thread Sean Mullan
On Tue, 19 Oct 2021 17:15:48 GMT, Anthony Scarpino wrote: >> Right, it's really just about using consistent message digest names so that >> it can match for example, "SHA-1" and also "SHA1withRSA". I'll change the >> name to something else. > > Was the reason for this change that hashName("RSA

Re: RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key

2021-10-19 Thread Anthony Scarpino
On Tue, 19 Oct 2021 15:48:57 GMT, Sean Mullan wrote: >> src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java line >> 196: >> >>> 194: static String canonicalName(String algorithm) { >>> 195: return CANONICAL_NAME.getOrDefault(algorithm, algorithm); >>> 196: } >

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v4]

2021-10-19 Thread Daniel Fuchs
On Tue, 19 Oct 2021 13:28:26 GMT, Aleksei Efimov wrote: >> This change implements a new service provider interface for host name and >> address resolution, so that java.net.InetAddress API can make use of >> resolvers other than the platform's built-in resolver. >> >> The following API classes

Re: RFR: 8272163: Add -version option to keytool and jarsigner [v4]

2021-10-19 Thread Hai-May Chao
On Tue, 19 Oct 2021 13:10:15 GMT, Weijun Wang wrote: >> Hai-May Chao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated comment in test > > Approved the PR. Thanks. I have a small comment on the CSR. @wangweij Updated the CSR with

Re: RFR: 8272163: Add -version option to keytool and jarsigner [v5]

2021-10-19 Thread Hai-May Chao
> It'd be useful to have a -version option for keytool and jarsigner. Many > other JDK tools already have a -version option. This is to add -version > option to keytool and jarsigner like jar command does. > > CSR review: > https://bugs.openjdk.java.net/browse/JDK-8275174 Hai-May Chao has updat

Re: RFR: 8272163: Add -version option to keytool and jarsigner [v4]

2021-10-19 Thread Hai-May Chao
On Tue, 19 Oct 2021 13:10:15 GMT, Weijun Wang wrote: >> Hai-May Chao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated comment in test > > Approved the PR. Thanks. I have a small comment on the CSR. @wangweij Thanks for reviewing

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs

2021-10-19 Thread Weijun Wang
On Thu, 5 Aug 2021 20:10:44 GMT, Weijun Wang wrote: > New `Subject` APIs `current()` and `callAs()` are created to be replacements > of `getSubject()` and `doAs()` since the latter two methods are now > deprecated for removal. > > In this implementation, by default, `current()` returns the sam

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs

2021-10-19 Thread Weijun Wang
On Wed, 18 Aug 2021 15:01:12 GMT, Sean Mullan wrote: >> New `Subject` APIs `current()` and `callAs()` are created to be replacements >> of `getSubject()` and `doAs()` since the latter two methods are now >> deprecated for removal. >> >> In this implementation, by default, `current()` returns t

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs

2021-10-19 Thread Sean Mullan
On Thu, 5 Aug 2021 20:10:44 GMT, Weijun Wang wrote: > New `Subject` APIs `current()` and `callAs()` are created to be replacements > of `getSubject()` and `doAs()` since the latter two methods are now > deprecated for removal. > > In this implementation, by default, `current()` returns the sam

RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs

2021-10-19 Thread Weijun Wang
New `Subject` APIs `current()` and `callAs()` are created to be replacements of `getSubject()` and `doAs()` since the latter two methods are now deprecated for removal. In this implementation, by default, `current()` returns the same value as `getSubject(AccessController.getCurrent())` and `cal

Re: RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key

2021-10-19 Thread Weijun Wang
On Tue, 19 Oct 2021 15:26:52 GMT, Sean Mullan wrote: >> src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java line >> 48: >> >>> 46:"SHA-384", "SHA384", "SHA-512", "SHA512", "SHA-512/224", >>> 47:"SHA512/224", "SHA-512/256", "SHA512/256"); >>> 48

Re: RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key

2021-10-19 Thread Sean Mullan
On Tue, 19 Oct 2021 14:34:25 GMT, Weijun Wang wrote: >> This fix improves the exception message to better indicate when the key (and >> not the signature algorithm) is restricted. This change also includes a few >> other improvements: >> >> - The constraints checking in `AlgorithmChecker.check

Re: RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key

2021-10-19 Thread Weijun Wang
On Wed, 13 Oct 2021 13:42:25 GMT, Sean Mullan wrote: > This fix improves the exception message to better indicate when the key (and > not the signature algorithm) is restricted. This change also includes a few > other improvements: > > - The constraints checking in `AlgorithmChecker.check()` h

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v3]

2021-10-19 Thread Aleksei Efimov
On Sun, 17 Oct 2021 21:39:06 GMT, Mark Sheppard wrote: > I think that a hostname is constant while a host is up, but it can be > changed, and when changed a host restart is required. I don't think it is > quite as dynamic as has been suggested, but I open to correction. It is possible to chang

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v3]

2021-10-19 Thread Aleksei Efimov
On Fri, 15 Oct 2021 17:19:26 GMT, Daniel Fuchs wrote: >> Aleksei Efimov has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Add @since tags to new API classes >> - Add checks and test for empty stream resolver results > > test/lib/jdk/tes

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v3]

2021-10-19 Thread Aleksei Efimov
On Fri, 15 Oct 2021 17:09:46 GMT, Daniel Fuchs wrote: >> Aleksei Efimov has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Add @since tags to new API classes >> - Add checks and test for empty stream resolver results > > test/jdk/java/ne

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v4]

2021-10-19 Thread Aleksei Efimov
> This change implements a new service provider interface for host name and > address resolution, so that java.net.InetAddress API can make use of > resolvers other than the platform's built-in resolver. > > The following API classes are added to `java.net.spi` package to facilitate > this: > -

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v3]

2021-10-19 Thread Aleksei Efimov
On Fri, 15 Oct 2021 14:25:02 GMT, Daniel Fuchs wrote: >> Aleksei Efimov has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Add @since tags to new API classes >> - Add checks and test for empty stream resolver results > > src/java.base/sh

Re: RFR: 8272163: Add -version option to keytool and jarsigner [v4]

2021-10-19 Thread Weijun Wang
On Tue, 19 Oct 2021 06:26:17 GMT, Hai-May Chao wrote: >> It'd be useful to have a -version option for keytool and jarsigner. Many >> other JDK tools already have a -version option. This is to add -version >> option to keytool and jarsigner like jar command does. >> >> CSR review: >> https://bu

Re: RFR: 8272163: Add -version option to keytool and jarsigner [v4]

2021-10-19 Thread Weijun Wang
On Tue, 19 Oct 2021 06:26:17 GMT, Hai-May Chao wrote: >> It'd be useful to have a -version option for keytool and jarsigner. Many >> other JDK tools already have a -version option. This is to add -version >> option to keytool and jarsigner like jar command does. >> >> CSR review: >> https://bu