tls.c File Reference

Generic TLS functionality. More...

## Data Structures

struct | dnsname_t

## Functions

xmpp_ctx_t * | xmpp_tlscert_get_ctx (const xmpp_tlscert_t *cert)
| Get the Strophe context which is assigned to this certificate. More...
xmpp_conn_t * | xmpp_tlscert_get_conn (const xmpp_tlscert_t *cert)
| Get the Strophe connection which is assigned to this certificate. More...
const char * | xmpp_tlscert_get_pem (const xmpp_tlscert_t *cert)
| Get the complete PEM of this certificate. More...
const char * | xmpp_tlscert_get_dnsname (const xmpp_tlscert_t *cert, size_t n)
| Get the dnsName entries out of the SubjectAlternativeNames. More...
const char * | xmpp_tlscert_get_string (const xmpp_tlscert_t *cert, xmpp_cert_element_t elmnt)
| Get various parts of the certificate as String. More...
const char * | xmpp_tlscert_get_description (xmpp_cert_element_t elmnt)
| Get a descriptive string for each xmpp_cert_element_t. More...
xmpp_tlscert_t * | tlscert_new (xmpp_ctx_t *ctx)
| Allocate and initialize a Strophe TLS certificate object. More...
void | xmpp_tlscert_free (xmpp_tlscert_t *cert)
| Free a certificate object. More...
int | tlscert_add_dnsname (xmpp_tlscert_t *cert, const char *dnsname)
| Add a dnsName to the Strophe TLS certificate object. More...

## Variables

const size_t | tlscert_dnsnames_increment = 4

## Detailed Description

Generic TLS functionality.

## Function Documentation

## tlscert_new()

xmpp_tlscert_t* tlscert_new | ( | xmpp_ctx_t * | ctx | ) |

Allocate and initialize a Strophe TLS certificate object.

Parameters

  ctx | a Strophe context object

Returns
  a certificate object or NULL

## tlscert_add_dnsname()

int tlscert_add_dnsname | ( | xmpp_tlscert_t * | cert,
|  | const char * | dnsname
| ) |  |

Add a dnsName to the Strophe TLS certificate object.

Parameters

  cert | a Strophe TLS certificate object
  dnsname | dnsName that shall be stored

Returns
  classic Unix style - 0=success, 1=error

## Variable Documentation

## tlscert_dnsnames_increment

const size_t tlscert_dnsnames_increment = 4