On Fri, 13 Nov 2026 14:05:11 GMT, Sean Mullan <[email protected]> wrote:

>> Remove digestAlgorithm check when there is no signed attribute.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> 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.

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

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

Reply via email to