|
NAMEASN1_item_sign ,
ASN1_item_sign_ctx —
DER-encode and sign an ASN.1 value
SYNOPSIS#include <openssl/x509.h>
int
int
DESCRIPTIONASN1_item_sign () assumes that
val_in is an ASN1_VALUE of the
type specified by it, encodes it into DER format by
calling
ASN1_item_i2d(3),
and signs the resulting byte array in a way similar to
EVP_DigestSign(3),
using a signing context created with
EVP_DigestSignInit(3)
for the given digest type and private key
pkey. The created signature is placed into the
sig_out object provided by the caller, freeing and
replacing any data already contained in that object.
For both functions, unless algor1 is
RETURN VALUESThese functions return the length of the signature in bytes or 0 if memory allocation, encoding, or signing fails.
SEE ALSOASN1_BIT_STRING_new(3), ASN1_item_digest(3), ASN1_item_i2d(3), ASN1_item_verify(3), EVP_Digest(3), EVP_DigestSign(3), EVP_MD_CTX_new(3), EVP_PKEY_new(3), OBJ_find_sigid_by_algs(3), X509_ALGOR_new(3)HISTORYASN1_item_sign () first appeared in OpenSSL 0.9.7 and has
been available since OpenBSD 3.1.
Visit the GSP FreeBSD Man Page Interface. |