WIP
[radsecproxy.git] / lib / attr.c
1 #include <freeradius/libradius.h>
2 #include "libradsec.h"
3 #include "libradsec-impl.h"
4
5 fixme
6 attr_create(fixme)
7 {
8
9   printf ("creating value pairs\n");
10   /* User-Name.  */
11   vp = pairmake ("User-Name", USER_NAME, 0);
12   if (!vp) {
13     fr_perror ("pairmake");
14     return -1;
15   }
16
17   /* User-Password.  */
18   {
19     size_t pwlen =  sizeof(USER_PW);
20     strncpy (user_pw, USER_PW, sizeof(user_pw));
21     rad_pwencode(user_pw, &pwlen, SECRET, reqauth);
22   }
23   pairadd (&vp, pairmake ("User-Password", user_pw, 0));
24   pkt->vps = vp;
25
26   printf ("attributes:\n");
27   vp_printlist (stdout, vp);
28 }