#include "../../str.h"
#include <time.h>


Go to the source code of this file.
Defines | |
| #define | NONCE_LEN (16+32) |
Functions | |
| void | calc_nonce (char *_nonce, int _expires, int _index, str *_secret) |
| Calculate nonce value. | |
| int | check_nonce (str *_nonce, str *_secret) |
| Check nonce value received from user agent. | |
| int | get_nonce_index (str *_nonce) |
| Get index from nonce string. | |
| int | is_nonce_stale (str *_nonce) |
| Check if a nonce is stale. | |
Definition in file nonce.h.
| #define NONCE_LEN (16+32) |
Length of nonce string in bytes
Definition at line 38 of file nonce.h.
Referenced by build_auth_hf(), and check_nonce().
| void calc_nonce | ( | char * | _nonce, | |
| int | _expires, | |||
| int | _index, | |||
| str * | _secret | |||
| ) |
Calculate nonce value.
Calculate nonce value value. The nonce value consists of the expires time (in seconds since 1.1 1970) and a secret phrase.
| _nonce | nonce value | |
| _expires | expires value | |
| _index | nonce index | |
| _secret | secret phrase |
| _nonce | nonce value | |
| _expires | expires value | |
| _index | nonce index | |
| _secret | secret |
Definition at line 110 of file nonce.c.
References integer2hex(), _str::len, MD5Init(), MD5Update(), nonce_reuse, _str::s, string2hex(), and U_MD5Final().
Referenced by build_auth_hf(), and check_nonce().
Check nonce value received from user agent.
| _nonce | nonce value | |
| _secret | secret phrase |
Definition at line 163 of file nonce.c.
References calc_nonce(), get_nonce_expires(), get_nonce_index(), _str::len, LM_DBG, NONCE_LEN, nonce_reuse, _str::s, and ZSW.
Referenced by pre_auth().
| int get_nonce_index | ( | str * | _n | ) |
Get index from nonce string.
| _n | nonce string |
Definition at line 140 of file nonce.c.
References hex2integer(), and _str::s.
Referenced by check_nonce(), and post_auth().
| int is_nonce_stale | ( | str * | _n | ) |
Check if a nonce is stale.
| _n | nonce string |
Definition at line 199 of file nonce.c.
References get_nonce_expires(), and _str::s.
Referenced by post_auth().
1.5.6