[#ASN1_sign] = ASN1_sign :mrdocs: Sign ASN.1 data described by an i2d encoder using `pkey` (deprecated). == Synopsis Declared in `<openssl/x509.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[deprecated]] int ASN1_sign( xref:i2d_of_void.adoc[i2d_of_void]* i2d, xref:X509_ALGOR.adoc[X509_ALGOR]* algor1, xref:X509_ALGOR.adoc[X509_ALGOR]* algor2, xref:ASN1_BIT_STRING.adoc[ASN1_BIT_STRING]* signature, char* data, xref:EVP_PKEY.adoc[EVP_PKEY]* pkey, xref:EVP_MD.adoc[EVP_MD] const* type); ---- [WARNING] ==== https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged. ==== == Return Value * Signature length in bytes on success, or 0 on failure. * Signature length in bytes on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *i2d* | Encoder that serializes `data` into DER for hashing. | *algor1* | Optional AlgorithmIdentifier updated with the signature algorithm, or NULL. | *algor2* | Optional second AlgorithmIdentifier updated similarly, or NULL. | *signature* | Output BIT STRING that receives the signature bits. | *data* | Structure passed to `i2d.` | *pkey* | Private key used for signing. | *type* | Digest algorithm used to hash the DER encoding. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#