Strophe: sasl.c File Reference

Strophe 0.12 XMPP client library

Functions
sasl.c File Reference

SASL authentication. More...

## Functions
char * | sasl_plain (xmpp_ctx_t *ctx, const char *authid, const char *password)
| generate authentication string for the SASL PLAIN mechanism
static char * | _make_string (xmpp_ctx_t *ctx, const char *s, unsigned len)
| helpers for digest auth
static char * | _make_quoted (xmpp_ctx_t *ctx, const char *s)
static hash_t * | _parse_digest_challenge (xmpp_ctx_t *ctx, const char *msg)
static void | _digest_to_hex (const char *digest, char *hex)
| expand a 16 byte MD5 digest to a 32 byte hex representation
static char * | _add_key (xmpp_ctx_t *ctx, hash_t *table, const char *key, char *buf, int quote)
| append 'key="value"' to a buffer, growing as necessary
char * | sasl_digest_md5 (xmpp_ctx_t *ctx, const char *challenge, const char *jid, const char *password)
| generate auth response string for the SASL DIGEST-MD5 mechanism
char * | sasl_scram (xmpp_ctx_t *ctx, const struct hash_alg *alg, const char *challenge, const char *first_bare, const char *jid, const char *password)
| generate auth response string for the SASL SCRAM mechanism

## Detailed Description

SASL authentication.

## Function Documentation

## ◆ sasl_plain()

char * sasl_plain | ( | xmpp_ctx_t * | ctx,
|  | const char * | authid,
|  | const char * | password
| ) |  |

generate authentication string for the SASL PLAIN mechanism

low-level sasl routines

## ◆ _make_string()

static char * _make_string | ( | xmpp_ctx_t * | ctx,
|  | const char * | s,
|  | unsigned | len
| ) |  |
| static

helpers for digest auth

## ◆ _make_quoted()

static char * _make_quoted | ( | xmpp_ctx_t * | ctx,
|  | const char * | s
| ) |  |
| static

## ◆ _parse_digest_challenge()

static hash_t * _parse_digest_challenge | ( | xmpp_ctx_t * | ctx,
|  | const char * | msg
| ) |  |
| static

## ◆ _digest_to_hex()

static void _digest_to_hex | ( | const char * | digest,
|  | char * | hex
| ) |  |
| static

expand a 16 byte MD5 digest to a 32 byte hex representation

## ◆ _add_key()

static char * _add_key | ( | xmpp_ctx_t * | ctx,
|  | hash_t * | table,
|  | const char * | key,
|  | char * | buf,
|  | int | quote
| ) |  |
| static

append 'key="value"' to a buffer, growing as necessary

## ◆ sasl_digest_md5()

char * sasl_digest_md5 | ( | xmpp_ctx_t * | ctx,
|  | const char * | challenge,
|  | const char * | jid,
|  | const char * | password
| ) |  |

generate auth response string for the SASL DIGEST-MD5 mechanism

## ◆ sasl_scram()

char * sasl_scram | ( | xmpp_ctx_t * | ctx,
|  | const struct hash_alg * | alg,
|  | const char * | challenge,
|  | const char * | first_bare,
|  | const char * | jid,
|  | const char * | password
| ) |  |

generate auth response string for the SASL SCRAM mechanism