[#PKCS7_set_type]
= PKCS7&lowbar;set&lowbar;type
:mrdocs:

Set the PKCS&num;7 content type and allocate the corresponding content structure&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS7&lowbar;set&lowbar;type(
    xref:PKCS7.adoc[PKCS7]* p7,
    int type);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p7*
| PKCS&num;7 object to initialise&period;
| *type*
| Content&hyphen;type NID such as NID&lowbar;pkcs7&lowbar;signed or NID&lowbar;pkcs7&lowbar;enveloped&period;
|===


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