GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NE_SSL_CERT_SIGNEDBY (3)

.ds Aq ’

NAME

ne_ssl_cert_identity, ne_ssl_cert_signedby, ne_ssl_cert_issuer, ne_ssl_cert_subject - functions to access certificate properties

CONTENTS

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 \(lqidentity\(rq 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 subject 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 particular 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 \(lqidentity\(rq. 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.\n", id);

dn = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); printf("Subject: %s\n", dn); free(dn);

dn = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); printf("Issuer: %s\n", dn); free(dn); }

SEE ALSO

ne_ssl_cert_cmp, ne_ssl_readable_dname

AUTHOR

Joe Orton <neon@lists.manyfish.co.uk>

Author.

COPYRIGHT

Search for    or go to Top of page |  Section 3 |  Main Index


neon 0.30.1 NE_SSL_CERT_IDENTITY (3) 23 September 2014

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.