Lines Matching refs:creds
40 creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen) in creds_to_radix() argument
49 buffer_append(&b, creds->service, strlen(creds->service)); in creds_to_radix()
51 buffer_append(&b, creds->instance, strlen(creds->instance)); in creds_to_radix()
53 buffer_append(&b, creds->realm, strlen(creds->realm)); in creds_to_radix()
55 buffer_append(&b, creds->pname, strlen(creds->pname)); in creds_to_radix()
57 buffer_append(&b, creds->pinst, strlen(creds->pinst)); in creds_to_radix()
63 buffer_put_int(&b, creds->issue_date); in creds_to_radix()
64 buffer_put_int(&b, krb_life_to_time(creds->issue_date, in creds_to_radix()
65 creds->lifetime)); in creds_to_radix()
66 buffer_append(&b, creds->session, sizeof(creds->session)); in creds_to_radix()
67 buffer_put_short(&b, creds->kvno); in creds_to_radix()
70 buffer_put_string(&b, creds->ticket_st.dat, creds->ticket_st.length); in creds_to_radix()
95 radix_to_creds(const char *buf, CREDENTIALS *creds) in radix_to_creds() argument
120 GETSTRING(&b, creds->service, sizeof creds->service); in radix_to_creds()
121 GETSTRING(&b, creds->instance, sizeof creds->instance); in radix_to_creds()
122 GETSTRING(&b, creds->realm, sizeof creds->realm); in radix_to_creds()
123 GETSTRING(&b, creds->pname, sizeof creds->pname); in radix_to_creds()
124 GETSTRING(&b, creds->pinst, sizeof creds->pinst); in radix_to_creds()
136 creds->issue_date = buffer_get_int(&b); in radix_to_creds()
139 creds->lifetime = krb_time_to_life(creds->issue_date, endTime); in radix_to_creds()
142 if (len < sizeof(creds->session)) in radix_to_creds()
144 memcpy(&creds->session, buffer_ptr(&b), sizeof(creds->session)); in radix_to_creds()
145 buffer_consume(&b, sizeof(creds->session)); in radix_to_creds()
147 creds->kvno = buffer_get_short(&b); in radix_to_creds()
150 if (len < 0 || len > sizeof(creds->ticket_st.dat)) in radix_to_creds()
152 memcpy(&creds->ticket_st.dat, p, len); in radix_to_creds()
153 creds->ticket_st.length = len; in radix_to_creds()