On Wed, 27 Apr 2022 23:30:22 GMT, Valerie Peng <valer...@openjdk.org> 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 lost when 
>> trying to go through the various if-else logic and figure out what you 
>> mean...
>
> 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 
> implementation supports returning the parameters as {@code 
> AlgorithmParameters}` as the underlying signature does not support 
> AlgorithmParameters for the supplied EdDSAParameterSpec object due to lack of 
> ASN.1 definition.

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 conditions 
tersely and correctly is key.

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

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

Reply via email to