Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output

2021-10-26 Thread Weijun Wang
On Tue, 26 Oct 2021 22:37:02 GMT, Hai-May Chao wrote: > This change does a few improvements to the output of `keytool -printcert > -jarfile` command to help readability and diagnosis. src/java.base/share/classes/sun/security/tools/keytool/Main.java line 2878: > 2876:

RFR: 8257722: Improve "keytool -printcert -jarfile" output

2021-10-26 Thread Hai-May Chao
This change does a few improvements to the output of `keytool -printcert -jarfile` command to help readability and diagnosis. - Commit messages: - 8257722: Improve "keytool -printcert -jarfile" output Changes: https://git.openjdk.java.net/jdk/pull/6126/files Webrev:

Re: RFR: X509Certificate.get{Subject,Issuer}AlternativeNames and getExtendedKeyUsage do not throw CertificateParsingException if extension is unparseable [v3]

2021-10-26 Thread Weijun Wang
On Tue, 26 Oct 2021 19:35:42 GMT, Sean Mullan wrote: >> The JDK implementation (as supplied by the "SUN" provider) of >> `X509Certificate::getSubjectAlternativeNames` and >> `X509Certificate::getIssuerAlternativeNames` returns `null` instead of >> throwing a `CertificateParsingException` when

Re: RFR: X509Certificate.get{Subject,Issuer}AlternativeNames and getExtendedKeyUsage do not throw CertificateParsingException if extension is unparseable [v3]

2021-10-26 Thread Sean Mullan
> The JDK implementation (as supplied by the "SUN" provider) of > `X509Certificate::getSubjectAlternativeNames` and > `X509Certificate::getIssuerAlternativeNames` returns `null` instead of > throwing a `CertificateParsingException` when the extension is unparseable. > > This fix changes the

Re: RFR: X509Certificate.get{Subject,Issuer}AlternativeNames and getExtendedKeyUsage do not throw CertificateParsingException if extension is unparseable [v2]

2021-10-26 Thread Sean Mullan
> The JDK implementation (as supplied by the "SUN" provider) of > `X509Certificate::getSubjectAlternativeNames` and > `X509Certificate::getIssuerAlternativeNames` returns `null` instead of > throwing a `CertificateParsingException` when the extension is unparseable. > > This fix changes the

Re: RFR: 8231107: Allow store password to be null when saving a PKCS12 KeyStore [v2]

2021-10-26 Thread Weijun Wang
> You can create a password-less PKCS12 KeyStore file now by calling > `ks.store(outStream, null)` no matter what the default cert protection > algorithm and Mac algorithm are defined in `java.security`. > > Note: the system properties set in `ToolsJDK.gmk` to generate `cacerts` must > be

Integrated: 8275079: Remove unnecessary conversion to String in java.net.http

2021-10-26 Thread Andrey Turbanov
On Sat, 2 Oct 2021 20:05:37 GMT, Andrey Turbanov wrote: > Cleanup unnecessary String.valueOf calls (and similar) when conversion will > happen implicitly anyway This pull request has now been integrated. Changeset: 19f76c21 Author:Andrey Turbanov Committer: Daniel Fuchs URL:

Re: RFR: 8231107: Allow store password to be null when saving a PKCS12 KeyStore

2021-10-26 Thread Sean Mullan
On Mon, 25 Oct 2021 23:44:18 GMT, Weijun Wang wrote: >> test/jdk/sun/security/pkcs12/EmptyPassword.java line 27: >> >>> 25: * @test >>> 26: * @bug 8202299 8231107 >>> 27: * @modules java.base/sun.security.tools.keytool >> >> Can you add an @summary? > > I'll update the existing summary to

Re: RFR: 8231107: Allow store password to be null when saving a PKCS12 KeyStore

2021-10-26 Thread Sean Mullan
On Thu, 14 Oct 2021 14:43:32 GMT, Weijun Wang wrote: > You can create a password-less PKCS12 KeyStore file now by calling > `ks.store(outStream, null)` no matter what the default cert protection > algorithm and Mac algorithm are defined in `java.security`. > > Note: the system properties set

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

2021-10-26 Thread Daniel Fuchs
On Tue, 26 Oct 2021 16:24:48 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

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

2021-10-26 Thread Aleksei Efimov
On Tue, 26 Oct 2021 15:04:54 GMT, Daniel Fuchs wrote: >> Aleksei Efimov has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 14 additional >>

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

2021-10-26 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: 8251468: X509Certificate.get{Subject, Issuer}AlternativeNames does not throw CertificateParsingException if extension is unparseable

2021-10-26 Thread Weijun Wang
On Tue, 26 Oct 2021 15:28:51 GMT, Sean Mullan wrote: >> I was asking if `getIssuerAlternativeNameExtension` can throw the exception >> if IAE exists but not parseable. > > Ok, I understand your comment now. I'm hesitant to change those methods to > throw an exception because to be consistent

Re: RFR: 8225181: KeyStore should have a getAttributes method

2021-10-26 Thread Weijun Wang
On Mon, 25 Oct 2021 14:36:58 GMT, Sean Mullan wrote: >> 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. > >

Re: RFR: 8225181: KeyStore should have a getAttributes method

2021-10-26 Thread Weijun Wang
On Mon, 25 Oct 2021 14:34:57 GMT, Sean Mullan wrote: >> 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. > >

Re: RFR: 8251468: X509Certificate.get{Subject, Issuer}AlternativeNames does not throw CertificateParsingException if extension is unparseable

2021-10-26 Thread Sean Mullan
On Mon, 25 Oct 2021 23:48:35 GMT, Weijun Wang wrote: >> Unless I am misunderstanding your comment, I don't think this is an issue in >> practice. The code inside the `X509CertImpl.getExtension` method only throws >> an Exception if invalid OIDs or attribute names are passed to the internal >>

Integrated: 8273299: Unnecessary Vector usage in java.security.jgss

2021-10-26 Thread Andrey Turbanov
On Thu, 26 Aug 2021 08:09:16 GMT, Andrey Turbanov wrote: > Usage of thread-safe collection Vector is unnecessary. It's recommended to > use ArrayList if a thread-safe implementation is not needed. This pull request has now been integrated. Changeset: c9dec2f9 Author:Andrey Turbanov

Re: RFR: 8275918: Remove unused local variables in java.base security code

2021-10-26 Thread Weijun Wang
On Sat, 23 Oct 2021 14:04:07 GMT, Andrey Turbanov wrote: > Cleanup unused local variables. Looks like they are leftovers after > refactoring. src/java.base/share/classes/sun/security/rsa/RSAPSSSignature.java line 211: > 209: AlgorithmParameterSpec keyParams = rsaKey.getParams(); >

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

2021-10-26 Thread Daniel Fuchs
On Tue, 26 Oct 2021 12:52:58 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

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

2021-10-26 Thread Alan Bateman
On Tue, 26 Oct 2021 12:52:58 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

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

2021-10-26 Thread Aleksei Efimov
On Tue, 26 Oct 2021 12:49:30 GMT, Aleksei Efimov wrote: >> src/java.base/share/classes/java/net/spi/InetAddressResolverProvider.java >> line 45: >> >>> 43: * system-wide resolver instance, which is used by >>> 44: * >>

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

2021-10-26 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 [v7]

2021-10-26 Thread Aleksei Efimov
On Sat, 23 Oct 2021 06:19:46 GMT, Alan Bateman wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More javadoc updates to API classes > > src/java.base/share/classes/java/net/InetAddress.java line 169: > >> 167:

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

2021-10-26 Thread Aleksei Efimov
On Sat, 23 Oct 2021 06:33:52 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/net/spi/InetAddressResolverProvider.java >> line 52: >> >>> 50: /** >>> 51: * Initialise and return the {@link InetAddressResolver} provided by >>> 52: * this provider. This method is called

RFR: 8275918: Remove unused local variables in java.base security code

2021-10-26 Thread Andrey Turbanov
Cleanup unused local variables. Looks like they are leftovers after refactoring. - Commit messages: - [PATCH] Remove unused local variables in java.base security code Changes: https://git.openjdk.java.net/jdk/pull/6092/files Webrev: