Loading...
Searching...
No Matches
auth_digest.h File Reference

Datatypes and functions for Digest authentication. More...

`#include <sofia-sip/su_alloc.h>`
Include dependency graph for auth_digest.h:

Go to the source code of this file.

## Data Structures

struct | auth_challenge_t
| Parameters for digest-challenge. More...
struct | auth_response_t
| Digest parameters for digest-response in Authorize. More...

## Macros

#define | AUTH_DIGEST_H
| Defined when <sofia-sip/auth_digest.h> has been included.

## Functions

issize_t | auth_digest_challenge_get (su_home_t *, auth_challenge_t *, char const *const params[])
| Get digest-challenge parameters.
void | auth_digest_challenge_free_params (su_home_t *home, auth_challenge_t *ac)
| Free challenge parameters.
issize_t | auth_digest_response_get (su_home_t *, auth_response_t *, char const *const params[])
| Get digest-response parameters.
int | auth_digest_ha1 (auth_hexmd5_t ha1, char const *username, char const *realm, char const *secret)
| Generate the hex A1 hash for digest authentication.
int | auth_digest_a1 (auth_response_t *ar, auth_hexmd5_t ha1, char const *secret)
| Generate A1 hash for digest authentication.
int | auth_digest_sessionkey (auth_response_t *, auth_hexmd5_t ha1, char const *secret)
| Generate MD5 session key for digest authentication.
int | auth_digest_response (auth_response_t *, auth_hexmd5_t response, auth_hexmd5_t const ha1, char const *method_name, void const *data, isize_t dlen)
| Generate response for digest authentication.
int | auth_strcmp (char const *quoted, char const *unquoted)
| Compare two strings, even if they are quoted.

## Detailed Description

Datatypes and functions for Digest authentication.

The structures and functions here follow the RFC 2617.

See also
  RFC 2617, "HTTP Authentication: Basic and Digest Access Authentication", J. Franks et al, June 1999.
  RFC 3261 section 22

Author
  Pekka Pessi Pekka.nosp@m..Pes.nosp@m.si@no.nosp@m.kia..nosp@m.com

Date
  Created: Thu Feb 22 12:25:55 2001 ppessi

## Function Documentation

## auth_digest_challenge_get()

issize_t auth_digest_challenge_get | ( | su_home_t * | home,
|  | auth_challenge_t * | ac0,
|  | char const *const | params[] )

Get digest-challenge parameters.

The function digest_challenge_get() searches for the digest authentication parameters in params. The parameters are assigned to the appropriate fields in ac structure.

Returns

The function digest_challenge_get() returns number of parameters found, or -1 upon an error.

## auth_digest_ha1()

int auth_digest_ha1 | ( | auth_hexmd5_t | ha1,
|  | char const * | username,
|  | char const * | realm,
|  | char const * | secret )

Generate the hex A1 hash for digest authentication.

Since
  New in 1.12.11

## auth_digest_response_get()

issize_t auth_digest_response_get | ( | su_home_t * | home,
|  | auth_response_t * | ar0,
|  | char const *const | params[] )

Get digest-response parameters.

The function auth_response_get() searches for the digest authentication parameters in params. The parameters are assigned to the appropriate fields in ar structure.

Returns

The function auth_response_get() returns number of parameters found, or -1 upon an error.

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.