[#PKCS7_add_certificate]
= PKCS7&lowbar;add&lowbar;certificate
:mrdocs:

Add a certificate to a PKCS&num;7 SignedData or SignedAndEnvelopedData structure&period;

== Synopsis

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

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

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p7*
| PKCS&num;7 object that already has a signed content type&period;
| *cert*
| Certificate to include&semi; a reference is retained by `p7&period;`
|===


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