On Mon, Nov 15, 2010, Patrick Patterson wrote:

> 
> 2: How would I go about signing this structure - I already have the data I 
> need in eContent, so I don't think that it would be THAT interesting to dump 
> it out into a BIO just to use a higher level function? I understand the 
> utility of using a BIO, in the S/MIME context, but when you are dealing with 
> relatively small structures (such as those outlined in RFC5272) I think it 
> would be good to have a CMS_sign_signedData(CMS_ContentInfo *cms), or some 
> such, that would simply take the values already present in the 
> CMS_signerInfos 
> structure and sign the signedData structure, without wanting to read back in 
> the content for eContent from a BIO.
> 
> Is there any easy way to do this? Have I missed some function that would 
> allow 
> this?
> 

If you call CMS_dataInit() with a NULL BIO it should make use of any content
already in the CMS structure. It does create a read only BIO internally for
that purpose.

Read only BIOs are useful when you want to convert a string into a BIO: the
function BIO_new_mem_buf() does that.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to