Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trying to build CMS signed data message with no content

11 views
Skip to first unread message

Jamil Nimeh

unread,
Apr 24, 2012, 10:06:45 PM4/24/12
to mozilla-dev...@lists.mozilla.org
Hi all,

I'm stuck on a problem I'm hoping someone can help me out with. I'm
trying to create a CMS signed data message with the eContent omitted.
When I pass zero-length data into NSS_CMSEncoder_Update() (null pointer,
empty string, doesn't seem to matter) I end up getting
SEC_ERROR_DIGEST_NOT_FOUND when NSS_CMSEncoder_Finish() is called. If I
include even 1 byte of data, then everything seems to work just fine.

Is there a way to get the encoder to honor the optional nature of
eContent? Am I just missing a step or call somewhere?

Any suggestions would be greatly appreciated. I'm stumped.

Thank you,
Jamil
0 new messages