mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
0eaf192d8f
programs to manipulate RADIUS packets. Mainly written by UMEZAWA Takeshi. fix and suggestion deraadt ok deraadt
24 lines
569 B
C
24 lines
569 B
C
#include "incs.h"
|
|
|
|
/*
|
|
* request/response association
|
|
*/
|
|
|
|
void test05(void)
|
|
{
|
|
RADIUS_PACKET *req0, *req1, *resp;
|
|
|
|
req0 = radius_new_request_packet(RADIUS_CODE_ACCESS_REQUEST);
|
|
req1 = radius_new_request_packet(RADIUS_CODE_ACCESS_REQUEST);
|
|
CHECK(radius_get_request_packet(req0) == NULL);
|
|
CHECK(radius_get_request_packet(req1) == NULL);
|
|
|
|
resp = radius_new_response_packet(RADIUS_CODE_ACCESS_ACCEPT, req0);
|
|
CHECK(radius_get_request_packet(resp) == req0);
|
|
|
|
radius_set_request_packet(resp, req1);
|
|
CHECK(radius_get_request_packet(resp) == req1);
|
|
}
|
|
|
|
ADD_TEST(test05)
|