Name

ne_ssl_certificate, ne_ssl_dname — structures representing SSL certificates

Synopsis

#include <ne_session.h>

/* A simplified X.509 distinguished name. */
typedef struct {
    const char *country, *state, *locality, *organization;
    const char *organizationalUnit;
    const char *commonName;
} ne_ssl_dname;

/* A simplified SSL certificate. */
typedef struct {
    const ne_ssl_dname *subject, *issuer;
    const char *from, *until;
} ne_ssl_certificate;

Description

The ne_ssl_dname structure is used to represent a simplified X.509 distinguished name, as used in SSL certificates; a distinguished name is used to uniquely identify an entity. Along with the fields giving the geographical and organizational location of the entity, the commonName field will be assigned the DNS hostname of the entity. The ne_ssl_readable_dname function can be used to create a single-line string out of an ne_ssl_dname structure.

The ne_ssl_certificate structure is used to represent a simplified SSL certificate; containing the distinguished names of the issuer and subject of the certificate. The issuer is the entity which has digitally signed the certificate to guarantee its authenticity; the subject is the owner of the certificate. A certificate is only valid for a certain period of time: the from and until contain strings giving the validity period.

See Also

ne_ssl_dname, ne_ssl_set_verify