Sign ASN.1 data described by an i2d encoder using pkey (deprecated).

Synopsis

Declared in <openssl/x509.h>

[[deprecated]]
int
ASN1_sign(
    i2d_of_void* i2d,
    X509_ALGOR* algor1,
    X509_ALGOR* algor2,
    ASN1_BIT_STRING* signature,
    char* data,
    EVP_PKEY* pkey,
    EVP_MD const* type);
Warning

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

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.

Created with MrDocs