[#ASN1_item_sign_ex] = ASN1_item_sign_ex :mrdocs: Sign the DER encoding of `data` using `it` and write AlgorithmIdentifier(s) plus the signature. == Synopsis Declared in `<openssl/asn1.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int ASN1_item_sign_ex( xref:ASN1_ITEM.adoc[ASN1_ITEM] const* it, xref:X509_ALGOR.adoc[X509_ALGOR]* algor1, xref:X509_ALGOR.adoc[X509_ALGOR]* algor2, xref:ASN1_BIT_STRING.adoc[ASN1_BIT_STRING]* signature, void const* data, xref:ASN1_OCTET_STRING.adoc[ASN1_OCTET_STRING] const* id, xref:EVP_PKEY.adoc[EVP_PKEY]* pkey, xref:EVP_MD.adoc[EVP_MD] const* md, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* libctx, char const* propq); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *it* | ASN.1 item describing `data.` | *algor1* | First AlgorithmIdentifier to fill (for example signatureAlgorithm), or NULL. | *algor2* | Optional second AlgorithmIdentifier to fill, or NULL. | *signature* | BIT STRING that receives the signature bytes. | *data* | Object whose DER encoding is signed. | *id* | Optional ASN.1 OCTET STRING identity / SM2‐id parameter, or NULL. | *pkey* | Private key used to create the signature. | *md* | Digest method, or NULL to use the key‐type default. | *libctx* | Library context for algorithm fetches, or NULL for the default. | *propq* | Property query for algorithm fetches, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#