Mercurial > hg > waaad
comparison waaad/tests/testsess.c @ 429:afa2b5ffe44c
Allow unaligned strings in uti_hash (as received inside RADIUS attributes)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 24 Jun 2009 16:40:10 +0900 |
parents | 860f41038ea2 |
children |
comparison
equal
deleted
inserted
replaced
428:5e793a4e2450 | 429:afa2b5ffe44c |
---|---|
70 /* First, initialize the daemon modules */ | 70 /* First, initialize the daemon modules */ |
71 INIT_WAAAD(); | 71 INIT_WAAAD(); |
72 g_pconf->diameter_identity = TEST_DIAM_ID; | 72 g_pconf->diameter_identity = TEST_DIAM_ID; |
73 g_conf->diamid_len = strlen(TEST_DIAM_ID); | 73 g_conf->diamid_len = strlen(TEST_DIAM_ID); |
74 | 74 |
75 /* Check that the hash function works properly with unaligned data */ | |
76 { | |
77 char * unalign = "a" TEST_DIAM_ID; | |
78 CHECK( uti_hash ( g_pconf->diameter_identity, g_conf->diamid_len ), uti_hash ( unalign + 1, g_conf->diamid_len )); | |
79 } | |
80 | |
75 /* Tests creation and destruction of sessions */ | 81 /* Tests creation and destruction of sessions */ |
76 { | 82 { |
77 sess_id_t * session = NULL; | 83 sess_id_t * session = NULL; |
78 | 84 |
79 /* Create one session */ | 85 /* Create one session */ |