Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v10]

2022-05-18 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v9]

2022-05-18 Thread Valerie Peng
On Tue, 17 May 2022 23:11:06 GMT, Weijun Wang wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> more minor cleanups for consistencies. > > src/java.base/share/classes/java/security/SignatureSpi.java line 377: > >>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v9]

2022-05-17 Thread Weijun Wang
On Tue, 17 May 2022 22:22:36 GMT, Valerie Peng wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v9]

2022-05-17 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-16 Thread Valerie Peng
On Mon, 16 May 2022 13:28:13 GMT, Sean Mullan wrote: >> With this modification of 2nd sentence. The whole paragraph becomes: >> >> * The returned parameters may be the same that were used to >> initialize >> * this signature, or may contain additional default or random parameter >>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v8]

2022-05-16 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-16 Thread Sean Mullan
On Fri, 13 May 2022 20:58:16 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/Signature.java line 1012: >> >>> 1010: * values used by the underlying signature scheme. If the required >>> 1011: * parameters were not supplied and can be generated by the >>>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-13 Thread Valerie Peng
On Fri, 13 May 2022 20:29:11 GMT, Sean Mullan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix newline. > > src/java.base/share/classes/java/security/Signature.java line 1012: > >> 1010: * values used by

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-13 Thread Sean Mullan
On Fri, 13 May 2022 19:35:35 GMT, Valerie Peng wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-13 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v6]

2022-05-13 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-13 Thread Valerie Peng
On Fri, 13 May 2022 14:35:56 GMT, Sean Mullan wrote: >> Hmm, would it fall under the "Otherwise, null is returned"? If not, perhaps >> we can add back the part about returning AlgorithmParameters as below: >> >> **If the underlying signature implementation supports returning the >> parameters

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-13 Thread Sean Mullan
On Thu, 12 May 2022 19:45:37 GMT, Valerie Peng wrote: >> That sentence is specifically if the caller did not specify parameters >> though. The previous wording is if the caller did specify parameters (as say >> an `AlgorithmParameterSpec`) and the implementation cannot return them as >>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-12 Thread Valerie Peng
On Thu, 12 May 2022 18:23:18 GMT, Sean Mullan wrote: >> Fixed the nit. Thanks~ >> As for the part about returning the parameters as `{@code >> AlgorithmParameters}`, it should be covered by current sentence, i.e. `and >> can be generated by the signature`. Perhaps we don't have to spell out

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-12 Thread Sean Mullan
On Wed, 11 May 2022 22:12:48 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/SignatureSpi.java line 399: >> >>> 397: * values used by the underlying signature scheme. If the required >>> 398: * parameters were not supplied and can be generated by the >>>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v5]

2022-05-11 Thread Valerie Peng
On Thu, 12 May 2022 00:21:34 GMT, Valerie Peng wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v5]

2022-05-11 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-11 Thread Valerie Peng
On Tue, 10 May 2022 20:42:55 GMT, Sean Mullan wrote: >> Valerie Peng 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 four additional >> commits

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-10 Thread Sean Mullan
On Mon, 9 May 2022 18:45:05 GMT, Valerie Peng wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-09 Thread Weijun Wang
On Mon, 9 May 2022 18:45:05 GMT, Valerie Peng wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-09 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v3]

2022-05-05 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-05-05 Thread Valerie Peng
On Wed, 4 May 2022 04:16:42 GMT, Xue-Lei Andrew Fan wrote: >> How about the case when no parameters are given? Say A is the user-supplied >> values, B is the provider specific default or random values, your suggestion >> has A, A+B, and null. Isn't the sentence about B needed (no A and

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-05-05 Thread Valerie Peng
On Thu, 5 May 2022 22:03:16 GMT, Valerie Peng wrote: >> I think this sentence covers case B, "... or may contain additional default >> or random parameter >> values used by the underlying signature implementation." > > Sean's comment on the other PR regarding Cipher.getParameters implies >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-05-04 Thread Valerie Peng
On Tue, 3 May 2022 00:17:11 GMT, Weijun Wang wrote: >> An example is RSASSA-PSS, i.e. it requires the caller to explicitly state >> which message digest to use, etc. > > You listed 2 cases when null is returned: 1) not supplied. 2) cannot > generate. My understanding is that the RSASSA-PSS

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-05-03 Thread Xue-Lei Andrew Fan
On Mon, 2 May 2022 21:42:28 GMT, Valerie Peng wrote: >>> What kind of additional sentence do you have in mind? >> >> It may be fine to put it into the state for 'null" returned value. For >> example: >> >> >> The returned parameters may be the same that were used to initialize >> this

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-05-02 Thread Weijun Wang
On Mon, 2 May 2022 21:14:21 GMT, Valerie Peng wrote: >> Then what does "cannot generate parameter values" mean? Any example? > > An example is RSASSA-PSS, i.e. it requires the caller to explicitly state > which message digest to use, etc. You listed 2 cases when null is returned: 1) not

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-05-02 Thread Valerie Peng
On Fri, 29 Apr 2022 04:27:36 GMT, Xue-Lei Andrew Fan wrote: >> What kind of additional sentence do you have in mind? > >> What kind of additional sentence do you have in mind? > > It may be fine to put it into the state for 'null" returned value. For > example: > > > The returned parameters

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-05-02 Thread Valerie Peng
On Thu, 28 Apr 2022 23:28:39 GMT, Weijun Wang wrote: >> The impl does not need to generate parameter values, but rather cannot >> convert the supplied parameter values into AlgorithmParameter objects. By >> parameter values, I mean the components of the parameters. > > Then what does "cannot

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-28 Thread Xue-Lei Andrew Fan
On Thu, 28 Apr 2022 23:09:00 GMT, Valerie Peng wrote: > What kind of additional sentence do you have in mind? It may be fine to put it into the state for 'null" returned value. For example: The returned parameters may be the same that were used to initialize this signature, or may contain

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-28 Thread Weijun Wang
On Thu, 28 Apr 2022 23:22:30 GMT, Valerie Peng wrote: >> I suggest the last sentence to be "null is returned if the required >> parameters were not supplied **or** the underlying signature implementation >> cannot generate the parameter values." I used "or" because for EdDSA >> parameters are

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-28 Thread Valerie Peng
On Thu, 28 Apr 2022 23:14:56 GMT, Weijun Wang wrote: >> I assume you were suggesting this? `"The returned parameters may be the same >> that were used to initialize this signature, or may contain additional >> default or random parameter values used by the underlying signature >>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-28 Thread Weijun Wang
On Thu, 28 Apr 2022 23:08:17 GMT, Valerie Peng wrote: >> So, "the underlying signature implementation supports returning the >> parameters as {@code AlgorithmParameters}" is quite necessary. Xuelei's >> suggestion is quite good, just change the last "and" to "or". > > I assume you were

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-28 Thread Valerie Peng
On Wed, 27 Apr 2022 23:02:28 GMT, Weijun Wang wrote: >> Right, the user-supplied values takes precedence and provider-specific >> default/random values should just be supplemental. >> >> As for EdDSA, looks like the prehash and context are only in RFC 8032 and >> NOT RFC 8410. caller has to

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-28 Thread Valerie Peng
On Thu, 28 Apr 2022 04:56:47 GMT, Xue-Lei Andrew Fan wrote: >>> Can you clarify what is the A and B that you are referring to? >> >> The sentence is, “If the required parameters were not supplied and the >> underlying signature implementation can generate the parameter values, it >> will be

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Xue-Lei Andrew Fan
On Thu, 28 Apr 2022 04:44:43 GMT, Xue-Lei Andrew Fan wrote: >>> > What does it refer to with 'it'? Is 'it' refer to the implementation >>> > generated parameter values? >>> >>> 'It' refers to the parameters containing all of the parameter values >>> including the supplied ones and

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Xue-Lei Andrew Fan
On Wed, 27 Apr 2022 23:35:19 GMT, Valerie Peng wrote: >> With Signature class, there is a caveat for EdDSA, the supplied parameters >> are set but null is being returned when getParameters() is called. This is >> currently covered by the condition `if the underlying signature >>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Xue-Lei Andrew Fan
On Thu, 28 Apr 2022 04:41:20 GMT, Xue-Lei Andrew Fan wrote: >> Besides this Signature-specific condition, there is the common condition >> where provider cannot (or do not) generate default parameter values. {@code >> null} is used as the catch-all result, but as you said, describe various >>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Valerie Peng
On Wed, 27 Apr 2022 23:30:22 GMT, Valerie Peng wrote: >> Can you clarify what is the A and B that you are referring to? The way I >> read it, it has more than 2 conditions... So, best to clarify the conditions >> first. >> I see your point with the wording suggestion at the end. Was a bit

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Valerie Peng
On Wed, 27 Apr 2022 23:19:56 GMT, Valerie Peng wrote: >>> What does it refer to with 'it'? Is 'it' refer to the implementation >>> generated parameter values? >> >> 'It' refers to the parameters containing all of the parameter values >> including the supplied ones and provider-generated ones

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Valerie Peng
On Wed, 27 Apr 2022 23:15:41 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/Signature.java line 1014: >> >>> 1012: * {@code AlgorithmParameters}. If the required >>> 1013: * parameters were not supplied and the underlying signature >>> implementation >>> 1014:

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Valerie Peng
On Wed, 27 Apr 2022 05:25:42 GMT, Xue-Lei Andrew Fan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Undo un-intentional changes. > > src/java.base/share/classes/java/security/Signature.java line 1012: > >> 1010:

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Weijun Wang
On Wed, 27 Apr 2022 22:54:47 GMT, Valerie Peng wrote: >> RSASSA-PSS always requires a user-provided params. >> >> I think one thing we can guarantee is that the default/random values >> generated by the impl will never overwrite the user-provided ones, they will >> only be supplemented. Also,

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Valerie Peng
On Wed, 27 Apr 2022 15:10:42 GMT, Weijun Wang wrote: >> I searched about "and/or" and it is said that "or" covers "and". So, >> "and/or" should just be "or". >> >> I am on the fence for requiring provider to generate default parameters >> (using provider-specific or random values). Could

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Weijun Wang
On Wed, 27 Apr 2022 00:35:49 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/Signature.java line 1015: >> >>> 1013: * parameters were not supplied and the underlying signature >>> implementation >>> 1014: * can generate the parameter values, it will be returned.

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-27 Thread Xue-Lei Andrew Fan
On Tue, 26 Apr 2022 17:51:45 GMT, Valerie Peng wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-26 Thread Valerie Peng
On Tue, 26 Apr 2022 14:59:35 GMT, Weijun Wang wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Undo un-intentional changes. > > src/java.base/share/classes/java/security/Signature.java line 1015: > >> 1013: *

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v2]

2022-04-26 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException

2022-04-26 Thread Valerie Peng
On Tue, 26 Apr 2022 14:51:31 GMT, Weijun Wang wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException

2022-04-26 Thread Weijun Wang
On Tue, 26 Apr 2022 02:59:48 GMT, Valerie Peng wrote: > This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and