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

Valerie Peng valeriep at openjdk.java.net
Thu Apr 28 23:26:43 UTC 2022


On Thu, 28 Apr 2022 23:14:56 GMT, Weijun Wang <weijun at openjdk.org> 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 implementation. {https://github.com/code null} is returned if the required parameters were not supplied and the underlying signature implementation cannot generate the parameter values."`
>> But the "the underlying signature implementation supports returning the parameters as {https://github.com/code AlgorithmParameters}" is necessary. Strictly speaking, this is somewhat different than the "cannot generate parameter values" though. Perhaps we should go a bit broader for the last sentence regarding null return value?
>
> 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 supplied but the impl cannot generate parameter values.

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.

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

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



More information about the security-dev mailing list