libressl-d2i_X509_SIG3
Decode and encode pkcs#7 digest information
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/x509.h>
X509_SIG *
d2i_X509_SIG(X509_SIG **val_out, const unsigned char **der_in, long length);
int
i2d_X509_SIG(X509_SIG *val_in, unsigned char **der_out);
X509_SIG *
d2i_PKCS8_bio(BIO *in_bio, X509_SIG **val_out);
int
i2d_PKCS8_bio(BIO *out_bio, X509_SIG *val_in);
X509_SIG *
d2i_PKCS8_fp(FILE *in_fp, X509_SIG **val_out);
int
i2d_PKCS8_fp(FILE *out_fp, X509_SIG *val_in);
Overview
d2i_X509_SIG() and i2d_X509_SIG() decode and encode an ASN.1 DigestInfo structure defined in RFC 2315 section 9.4 and equivalently in RFC 8017 section 9.2. For details about the semantics, examples, caveats, and bugs, see ASN1_item_d2i(3).
d2i_PKCS8_bio() and d2i_PKCS8_fp() are similar to d2i_X509_SIG() except that they read from a BIO or FILE pointer.
i2d_PKCS8_bio() and i2d_PKCS8_fp() are similar to i2d_X509_SIG() except that they write to a BIO or FILE pointer.
Return values
d2i_X509_SIG(), d2i_PKCS8_bio(), and d2i_PKCS8_fp() return an X509_SIG object or NULL if an error occurs.
i2d_X509_SIG() returns the number of bytes successfully encoded or a negative value if an error occurs.
i2d_PKCS8_bio() and i2d_PKCS8_fp() return 1 for success or 0 if an error occurs.