Strophe 0.13 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 struct conn_interface | tls_intf
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

## ◆ tls_intf

const struct conn_interface tls_intf

Initial value:
= {
tls_read,
tls_write,
tls_clear_pending_write,
tls_pending,
tls_error,
tls_is_recoverable,
NULL,
}
tls_write
int tls_write(struct conn_interface *intf, const void *buff, size_t len)
Definition tls_dummy.c:127
tls_read
int tls_read(struct conn_interface *intf, void *buff, size_t len)
Definition tls_dummy.c:119
tls_clear_pending_write
int tls_clear_pending_write(struct conn_interface *intf)
Definition tls_dummy.c:135
tls_pending
int tls_pending(struct conn_interface *intf)
Definition tls_dummy.c:113
tls_error
int tls_error(struct conn_interface *intf)
Definition tls_dummy.c:107
tls_is_recoverable
int tls_is_recoverable(struct conn_interface *intf, int error)
Definition tls_dummy.c:141

## ◆ tlscert_dnsnames_increment

const size_t tlscert_dnsnames_increment = 4