
#use wml::openssl-macros area=docs page=CMS_final

<title>Documents, CMS_final(3)</title>

<h1>CMS_final(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#NOTES">NOTES</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
	<LI><A HREF="#HISTORY">HISTORY</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<PRE> CMS_final - finalise a CMS_ContentInfo structure
</PRE>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/cms.h&gt;
</PRE>
<PRE> int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>CMS_final()</CODE> finalises the structure <STRONG>cms</STRONG>. It's purpose is to perform any operations necessary on <STRONG>cms</STRONG> (digest computation for example) and set the appropriate fields. The
parameter <STRONG>data</STRONG> contains the content to be processed. The <STRONG>dcont</STRONG> parameter contains a BIO to write content to after processing: this is only
used with detached data and will usually be set to NULL.

</P>
<P>
<HR>
<H1><A NAME="NOTES">NOTES</A></H1>
<P>
This function will normally be called when the <STRONG>CMS_PARTIAL</STRONG> flag is used. It should only be used when streaming is not performed
because the streaming I/O functions perform finalisation operations
internally.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
<CODE>CMS_final()</CODE> returns 1 for success or 0 for failure.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../crypto/ERR_get_error.html#">ERR_get_error(3)</A>, <A HREF="../crypto/CMS_sign.html#">CMS_sign(3)</A>,
<A HREF="../crypto/CMS_encrypt.html#">CMS_encrypt(3)</A>



</P>
<P>
<HR>
<H1><A NAME="HISTORY">HISTORY</A></H1>
<P>
<CODE>CMS_final()</CODE> was added to OpenSSL 0.9.8

</P>
:}

