libressl-d2i_GENERAL_NAME3
Decode and encode names for use in x.509 extensions
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/x509v3.h>
GENERAL_NAME *
d2i_GENERAL_NAME(GENERAL_NAME **val_out, const unsigned char **der_in, long length);
int
i2d_GENERAL_NAME(GENERAL_NAME *val_in, unsigned char **der_out);
GENERAL_NAMES *
d2i_GENERAL_NAMES(GENERAL_NAMES **val_out, const unsigned char **der_in, long length);
int
i2d_GENERAL_NAMES(GENERAL_NAMES *val_in, unsigned char **der_out);
EDIPARTYNAME *
d2i_EDIPARTYNAME(EDIPARTYNAME **val_out, const unsigned char **der_in, long length);
int
i2d_EDIPARTYNAME(EDIPARTYNAME *val_in, unsigned char **der_out);
OTHERNAME *
d2i_OTHERNAME(OTHERNAME **val_out, const unsigned char **der_in, long length);
int
i2d_OTHERNAME(OTHERNAME *val_in, unsigned char **der_out);
Overview
These functions decode and encode names that can be used in X.509 extensions. For details about the semantics, examples, caveats, and bugs, see ASN1_item_d2i(3).
d2i_GENERAL_NAME() and i2d_GENERAL_NAME() decode and encode an ASN.1 GeneralName structure defined in RFC 5280 section 4.2.1.6.
d2i_GENERAL_NAMES() and i2d_GENERAL_NAMES() decode and encode an ASN.1 GeneralNames structure defined in RFC 5280 section 4.2.1.6.
d2i_EDIPARTYNAME() and i2d_EDIPARTYNAME() decode and encode an ASN.1 EDIPartyName structure defined in RFC 5280 section 4.2.1.6.
d2i_OTHERNAME() and i2d_OTHERNAME() decode and encode an ASN.1 OtherName structure defined in RFC 5280 section 4.2.1.6.
Return values
d2i_GENERAL_NAME(), d2i_GENERAL_NAMES(), d2i_EDIPARTYNAME(), and d2i_OTHERNAME() return a GENERAL_NAME, GENERAL_NAMES, EDIPARTYNAME, or OTHERNAME object, respectively, or NULL if an error occurs.
i2d_GENERAL_NAME(), i2d_GENERAL_NAMES(), i2d_EDIPARTYNAME(), and i2d_OTHERNAME() return the number of bytes successfully encoded or a negative value if an error occurs.