Lines Matching refs:auth
33 static int rc_pack_list (VALUE_PAIR *vp, char *secret, AUTH_HDR *auth)
42 buf = auth->data;
107 vector = (char *)auth->vector;
143 memcpy ((char *) md5buf + secretlen, (char *) auth->vector,
200 AUTH_HDR *auth, *recv_auth;
262 auth = (AUTH_HDR *) send_buffer;
263 auth->code = data->code;
264 auth->id = data->seq_nbr;
268 total_length = rc_pack_list(data->send_pairs, secret, auth) + AUTH_HDR_LEN;
270 auth->length = htons ((unsigned short) total_length);
272 memset((char *) auth->vector, 0, AUTH_VECTOR_LEN);
274 memcpy ((char *) auth + total_length, secret, secretlen);
275 rc_md5_calc (vector, (char *) auth, total_length + secretlen);
276 memcpy ((char *) auth->vector, (char *) vector, AUTH_VECTOR_LEN);
281 memcpy (auth->vector, vector, AUTH_VECTOR_LEN);
283 total_length = rc_pack_list(data->send_pairs, secret, auth) + AUTH_HDR_LEN;
285 auth->length = htons ((unsigned short) total_length);
296 sendto (sockfd, (char *) auth, (unsigned int) total_length, (int) 0,
395 static int rc_check_reply (AUTH_HDR *auth, int bufferlen, char *secret,
403 totallen = ntohs (auth->length);
421 if (auth->id != seq_nbr)
428 memcpy ((char *) reply_digest, (char *) auth->vector, AUTH_VECTOR_LEN);
429 memcpy ((char *) auth->vector, (char *) vector, AUTH_VECTOR_LEN);
430 memcpy ((char *) auth + totallen, secret, secretlen);
431 rc_md5_calc (calc_digest, (char *) auth, totallen + secretlen);
463 if (auth->code == PW_ACCOUNTING_RESPONSE)