On Sat, 14 Nov 2026 21:30:47 GMT, Weijun Wang <[email protected]> wrote:

>> test/jdk/sun/security/pkcs/pkcs7/MLDSADirectSign.java line 1:
>> 
>>> 1: /*
>> 
>> Should you also verify SHA-512 is used by default when there are no 
>> attributes?
>
> The last line at https://www.rfc-editor.org/info/rfc9882/#section-3.3-2.2.3 
> says
>> implementations MUST ignore the content of the digestAlgorithm field.
> 
> My understanding is that the rules for the writer and the reader are 
> different: writer MUST write SHA-512, and reader MUST ignore it. The field 
> has no usage when there is no signed attributes.

Oh, but I was thinking in the test you could check that we put SHA-512 in there 
for our own implementation to comply with the RFC. Not to enforce it in the 
runtime or anything like that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33254#discussion_r4604452213

Reply via email to