Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-08 Thread Weijun Wang
On Fri, 2 Sep 2022 09:11:56 GMT, Bernd wrote: > Should this also be aligned with EncryptedPrivateKeyInfo? `EncryptedPrivateKeyInfo` claims it might return a different more-standard name other than the one provided in a constructor, We don't intend to do it here because of compatibility issue.

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-08 Thread Weijun Wang
On Fri, 2 Sep 2022 08:51:04 GMT, Bernd wrote: >> I want this to be spec from now on. If we want to backport this to older >> releases, then the paragraph above can be @implNote. > > I agree that this should be in the API spec. > > Does the „return null“ case for invalid encodings need to mentio

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-02 Thread Bernd
On Thu, 1 Sep 2022 23:55:03 GMT, Weijun Wang wrote: >> src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java line >> 75: >> >>> 73: * field is returned in its string format as a series of nonnegative >>> 74: * integers separated by periods (For example, "1.3.14.7.2.1

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-02 Thread Bernd
On Thu, 1 Sep 2022 23:50:47 GMT, Weijun Wang wrote: >> Since the algorithm is already encoded inside a PKCS #8 data block, it is >> not necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is >> created. The same for `X509EncodedKeySpec`. > > Weijun Wang has updated the pull re

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method

2022-09-01 Thread Weijun Wang
On Thu, 1 Sep 2022 23:45:30 GMT, Valerie Peng wrote: > I assume there will be regression test? Yes. I am only proposing spec change at the moment. Once we reach an agreement I'll fix a CSR and start coding on implementation and tests. - PR: https://git.openjdk.org/jdk/pull/10131

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-01 Thread Anthony Scarpino
On Thu, 1 Sep 2022 23:50:47 GMT, Weijun Wang wrote: >> Since the algorithm is already encoded inside a PKCS #8 data block, it is >> not necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is >> created. The same for `X509EncodedKeySpec`. > > Weijun Wang has updated the pull re

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-01 Thread Weijun Wang
On Thu, 1 Sep 2022 23:44:02 GMT, Valerie Peng wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fine tune spec > > src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java line > 75: > >> 73: * f

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-01 Thread Weijun Wang
On Thu, 1 Sep 2022 23:28:32 GMT, Anthony Scarpino wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fine tune spec > > src/java.base/share/classes/java/security/spec/EncodedKeySpec.java line 109: > >> 107: * If

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method

2022-09-01 Thread Valerie Peng
On Thu, 1 Sep 2022 23:25:16 GMT, Weijun Wang wrote: > Since the algorithm is already encoded inside a PKCS #8 data block, it is not > necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is > created. The same for `X509EncodedKeySpec`. I assume there will be regression test?

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-01 Thread Valerie Peng
On Thu, 1 Sep 2022 23:45:31 GMT, Weijun Wang wrote: >> Since the algorithm is already encoded inside a PKCS #8 data block, it is >> not necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is >> created. The same for `X509EncodedKeySpec`. > > Weijun Wang has updated the pull re

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method [v2]

2022-09-01 Thread Weijun Wang
> Since the algorithm is already encoded inside a PKCS #8 data block, it is not > necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is > created. The same for `X509EncodedKeySpec`. Weijun Wang has updated the pull request incrementally with one additional commit since the la

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method

2022-09-01 Thread Anthony Scarpino
On Thu, 1 Sep 2022 23:25:16 GMT, Weijun Wang wrote: > Since the algorithm is already encoded inside a PKCS #8 data block, it is not > necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is > created. The same for `X509EncodedKeySpec`. src/java.base/share/classes/java/security

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method

2022-09-01 Thread Weijun Wang
On Thu, 1 Sep 2022 23:30:40 GMT, Anthony Scarpino wrote: >> Since the algorithm is already encoded inside a PKCS #8 data block, it is >> not necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is >> created. The same for `X509EncodedKeySpec`. > > src/java.base/share/classes/ja

Re: RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method

2022-09-01 Thread Weijun Wang
On Thu, 1 Sep 2022 23:25:16 GMT, Weijun Wang wrote: > Since the algorithm is already encoded inside a PKCS #8 data block, it is not > necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is > created. The same for `X509EncodedKeySpec`. The first commit only contains API change

RFR: 5066842: PKCS8EncodedKeySpec needs getAlgorithm method

2022-09-01 Thread Weijun Wang
Since the algorithm is already encoded inside a PKCS #8 data block, it is not necessary to provide an algorithm when a `PKCS8EncodedKeySpec` object is created. The same for `X509EncodedKeySpec`. - Commit messages: - api change Changes: https://git.openjdk.org/jdk/pull/10131/files