0335304E The message-digest authenticated attribute is not allowed.

Explanation

The set of authenticated attributes that are supplied from the attributes_signers parameter must NOT include the message-digest authenticated attribute as this is automatically provided by gsk_make_signed_data_content_extended() and gsk_make_signed_data_msg_extended().

User response

Do not include content-type or message-digest in the set of authenticated attributes that are supplied to gsk_make_signed_data_content_extended() or gsk_make_signed_data_msg_extended().