[#OSSL_CMP_MSG_write]
= OSSL&lowbar;CMP&lowbar;MSG&lowbar;write
:mrdocs:

Write a CMP message to a file in DER encoding&period;

== Synopsis

Declared in `&lt;openssl&sol;cmp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;CMP&lowbar;MSG&lowbar;write(
    char const* file,
    xref:OSSL_CMP_MSG.adoc[OSSL&lowbar;CMP&lowbar;MSG] const* msg);
----

== Return Value

Number of bytes written, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *file*
| Destination file path&period;
| *msg*
| CMP message to write&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
