Strophe: tls.c File Reference

Strophe 0.12 XMPP client library

Data Structures | Functions | Variables
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.
xmpp_conn_t * | xmpp_tlscert_get_conn (const xmpp_tlscert_t *cert)
| Get the Strophe connection which is assigned to this certificate.
const char * | xmpp_tlscert_get_pem (const xmpp_tlscert_t *cert)
| Get the complete PEM of this certificate.
const char * | xmpp_tlscert_get_dnsname (const xmpp_tlscert_t *cert, size_t n)
| Get the dnsName entries out of the SubjectAlternativeNames.
const char * | xmpp_tlscert_get_string (const xmpp_tlscert_t *cert, xmpp_cert_element_t elmnt)
| Get various parts of the certificate as String.
const char * | xmpp_tlscert_get_description (xmpp_cert_element_t elmnt)
| Get a descriptive string for each xmpp_cert_element_t.
xmpp_tlscert_t * | tlscert_new (xmpp_ctx_t *ctx)
| Allocate and initialize a Strophe TLS certificate object.
void | xmpp_tlscert_free (xmpp_tlscert_t *cert)
| Free a certificate object.
int | tlscert_add_dnsname (xmpp_tlscert_t *cert, const char *dnsname)
| Add a dnsName to the Strophe TLS certificate object.
int | tls_caching_password_callback (char *pw, size_t pw_max, xmpp_conn_t *conn)
void | tls_clear_password_cache (xmpp_conn_t *conn)

## 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

## ◆ tls_caching_password_callback()

int tls_caching_password_callback | ( | char * | pw,
|  | size_t | pw_max,
|  | xmpp_conn_t * | conn
| ) |  |

## ◆ tls_clear_password_cache()

void tls_clear_password_cache | ( | xmpp_conn_t * | conn | ) |

## Variable Documentation

## ◆ tlscert_dnsnames_increment

const size_t tlscert_dnsnames_increment = 4