OpenSSL

Cryptography and SSL/TLS Toolkit

d2i_X509_NAME

NAME

d2i_X509_NAME, i2d_X509_NAME - X509_NAME encoding functions

SYNOPSIS

 #include <openssl/x509.h>

 X509_NAME *d2i_X509_NAME(X509_NAME **a, unsigned char **pp, long length);
 int i2d_X509_NAME(X509_NAME *a, unsigned char **pp);

 int X509_NAME_get0_der(const unsigned char **pder, size_t *pderlen,
                        X509_NAME *nm)

DESCRIPTION

The functions d2i_X509_NAME() and i2d_X509_NAME() decode and encode an X509_NAME structure which is the same as the Name type defined in RFC3280 (and elsewhere) and used for example in certificate subject and issuer names.

Otherwise the functions behave in a similar way to d2i_X509() and i2d_X509() described in the d2i_X509 manual page.

The function X509_NAME_get0_der() returns an internal pointer to the encoding of an X509_NAME structure in *pder and consisting of *pderlen bytes. It is useful for applications that wish to examine the encoding of an X509_NAME structure without copying it.

RETURN VALUES

SEE ALSO

The meanings of the return values of d2i_X509_NAME() and i2d_X509_NAME() are similar to those for d2i_X509() and i2d_X509().

The function X509_NAME_get0_der() returns 1 for success and 0 if an error occurred.

d2i_X509