On Tue, 30 Mar 2021 18:41:45 GMT, Sean Mullan <mul...@openjdk.org> wrote:

>> There are other fields in `RSASSAParams`, so if there is no DigestMethod, it 
>> will be SHA-256 but the other fields (like SaltLength or TrailerField) will 
>> still be read if they exist.
>> 
>> If there is no `RSASSAParams` at all or if it's empty, then the defaults 
>> will be returned.
>
> I wonder if the @implSpec is clear enough that this will be returned. I might 
> suggest adding a similar @implSpec in this method that basically states what 
> you said above.

I'm not sure if it's appropriate to specify the default value in this method. 
As long as there is an `RSAPSSParameterSpec` object, there must be a non-null 
`PSSParameterSpec` inside and it is the one that was used to construct this 
object.

I am thinking if we can append the following to the `@implNote` in the class 
spec:
 * One can obtain this default value using the following expression:
 * <pre><code>
 * XMLSignatureFactory.getInstance()
 *      .newSignatureMethod(SignatureMethod.RSA_PSS, null)
 *      .getParameterSpec()
 * </code></pre>

but this makes it more like an `@implNote` instead of an `@implSpec`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3181

Reply via email to