from small one page howto to huge articles all in one place
 

search text in:





Poll
Which kernel version do you use?





poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

196714

userrating:

average rating: 1.7 (102 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

252324

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

141294

userrating:

average rating: 1.4 (42 votes) (1=very good 6=terrible)


April, 26th. 2006:

Druckversion
You are here: manpages





NE_SSL_CERT_IDENTITY

Section: neon API reference (3)
Updated: 30 September 2016
Index Return to Main Contents
 

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 lqidentityrq 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 lqidentityrq. 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



 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLES
SEE ALSO
AUTHOR
COPYRIGHT





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 12.6 ms