[#PKCS7_add1_attrib_digest]
= PKCS7&lowbar;add1&lowbar;attrib&lowbar;digest
:mrdocs:

Add a PKCS&num;9 messageDigest authenticated attribute to a SignerInfo&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS7&lowbar;add1&lowbar;attrib&lowbar;digest(
    xref:PKCS7_SIGNER_INFO.adoc[PKCS7&lowbar;SIGNER&lowbar;INFO]* si,
    unsigned char const* md,
    int mdlen);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *si*
| SignerInfo to update&period;
| *md*
| Digest octets to embed (copied into a new ASN1&lowbar;OCTET&lowbar;STRING)&period;
| *mdlen*
| Length of `md` in bytes&period;
|===


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