ASN1_item_sign_ctx

Sign the DER encoding of data using an already-initialized digest/signing context.

Synopsis

Declared in <openssl/x509.h>

int
ASN1_item_sign_ctx(
    ASN1_ITEM const* it,
    X509_ALGOR* algor1,
    X509_ALGOR* algor2,
    ASN1_BIT_STRING* signature,
    void const* data,
    EVP_MD_CTX* ctx);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
itASN.1 item descriptor for data (for example ASN1_ITEM_rptr(X509_CINF)).
algor1Optional AlgorithmIdentifier to set for the signature algorithm, or NULL.
algor2Optional second AlgorithmIdentifier to set, or NULL.
signatureDestination BIT STRING that receives the signature bits.
dataObject to encode with it and sign.
ctxMessage-digest context already set up for signing (holds the private key).