Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ne_ssl_readable_dname(3) [opensolaris man page]

NE_SSL_DNAME(3) 						neon API reference						   NE_SSL_DNAME(3)

NAME
ne_ssl_readable_dname, ne_ssl_dname_cmp - SSL distinguished name handling SYNOPSIS
#include <ne_ssl.h> const char *ne_ssl_readable_dname (const ne_ssl_dname *dname); int ne_ssl_dname_cmp (const ne_ssl_dname *dn1, const ne_ssl_dname *dn2); DESCRIPTION
The ne_ssl_readable_dname function creates a single-line, human-readable string out of an ne_ssl_dname object. The returned string is mal- loc()-allocated, and must be free()d by the caller. The ne_ssl_dname_cmp function compares two distinguished names, and returns zero if they are equal, or non-zero otherwise. RETURN VALUE
ne_ssl_readable_dname returns a malloc-allocated string, and never NULL. EXAMPLES
See ne_ssl_cert_subject(3) for an example use of ne_ssl_readable_dname. SEE ALSO
ne_ssl_cert_subject(3) AUTHOR
Joe Orton <neon@webdav.org>. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWneon | +--------------------+-----------------+ |Interface Stability | Volatile | +--------------------+-----------------+ NOTES
Source for Neon is available on http://opensolaris.org. neon 0.25.5 20 January 2006 NE_SSL_DNAME(3)

Check Out this Related Man Page

NE_SSL_CERT_IDENTI(3)						neon API reference					     NE_SSL_CERT_IDENTI(3)

NAME
ne_ssl_cert_identity, ne_ssl_cert_signedby, ne_ssl_cert_issuer, ne_ssl_cert_subject - functions to access certificate properties SYNOPSIS
#include <ne_ssl.h> const char *ne_ssl_cert_identity (const ne_ssl_certificate *cert); const ne_ssl_certificate *ne_ssl_cert_signedby (const ne_ssl_certificate *cert); const ne_ssl_dname *ne_ssl_cert_subject (const ne_ssl_certificate *cert); const ne_ssl_dname *ne_ssl_cert_issuer (const ne_ssl_certificate *cert); DESCRIPTION
The function ne_ssl_cert_identity retrieves the ``identity'' of a certificate; for an SSL server certificate, this will be the hostname for which the certificate was issued. In PKI parlance, the identity is the common name attribute of the distinguished name of the certificate subject. The functions ne_ssl_cert_subject and ne_ssl_cert_issuer can be used to access the objects representing the distinguished name of the sub- ject and of the issuer of a certificate, respectively. If a certificate object is part of a certificate chain, then ne_ssl_cert_signedby can be used to find the certificate which signed a par- ticular certificate. For a self-signed certificate or a certificate for which the full chain is not available, this function will return NULL. RETURN VALUE
ne_ssl_cert_issuer and ne_ssl_cert_subject are guaranteed to never return NULL. ne_ssl_cert_identity may return NULL if the certificate has no specific ``identity''. ne_ssl_cert_signedby may return NULL as covered above. EXAMPLES
The following function could be used to display information about a given certificate: void dump_cert(const ne_ssl_certificate *cert) { const char *id = ne_ssl_cert_identity(cert); char *dn; if (id) printf("Certificate was issued for '%s'. ", id); dn = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); printf("Subject: %s ", dn); free(dn); dn = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); printf("Issuer: %s ", dn); free(dn); } SEE ALSO
ne_ssl_cert_cmp(3), ne_ssl_readable_dname(3) AUTHOR
Joe Orton <neon@webdav.org>. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWneon | +--------------------+-----------------+ |Interface Stability | Volatile | +--------------------+-----------------+ NOTES
Source for Neon is available on http://opensolaris.org. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWneon | +--------------------+-----------------+ |Interface Stability | Volatile | +--------------------+-----------------+ NOTES
Source for Neon is available on http://opensolaris.org. neon 0.25.5 20 January 2006 NE_SSL_CERT_IDENTI(3)
Man Page