auth_digest.c File Reference


Detailed Description

Implementation for digest authentication.

Author:
Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>
Date:
Created: Thu Feb 22 12:10:37 2001 ppessi

#include "config.h"
#include <sofia-sip/su_md5.h>
#include "sofia-sip/auth_common.h"
#include "sofia-sip/auth_digest.h"
#include "sofia-sip/msg_header.h"
#include "iptsec_debug.h"
#include <string.h>
#include <stdarg.h>
#include <limits.h>
#include <assert.h>

Include dependency graph for auth_digest.c:


Functions

issize_t auth_digest_challenge_get (su_home_t *home, auth_challenge_t *ac0, 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 *home, auth_response_t *ar0, char const *const params[])
 Get digest-response parameters.
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 *ar, auth_hexmd5_t ha1, char const *secret)
 Generate MD5 session key for digest authentication.
int auth_digest_response (auth_response_t *ar, auth_hexmd5_t response, auth_hexmd5_t const ha1, char const *method_name, void const *data, isize_t dlen)
 Generate response for digest authentication.

Function Documentation

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.

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.4 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.