Lines Matching refs:rxk5

184 static void rxrpc_rxk5_free(struct rxk5_key *rxk5)  in rxrpc_rxk5_free()  argument
188 rxrpc_free_krb5_principal(&rxk5->client); in rxrpc_rxk5_free()
189 rxrpc_free_krb5_principal(&rxk5->server); in rxrpc_rxk5_free()
190 rxrpc_free_krb5_tagged(&rxk5->session); in rxrpc_rxk5_free()
192 if (rxk5->addresses) { in rxrpc_rxk5_free()
193 for (loop = rxk5->n_addresses - 1; loop >= 0; loop--) in rxrpc_rxk5_free()
194 rxrpc_free_krb5_tagged(&rxk5->addresses[loop]); in rxrpc_rxk5_free()
195 kfree(rxk5->addresses); in rxrpc_rxk5_free()
197 if (rxk5->authdata) { in rxrpc_rxk5_free()
198 for (loop = rxk5->n_authdata - 1; loop >= 0; loop--) in rxrpc_rxk5_free()
199 rxrpc_free_krb5_tagged(&rxk5->authdata[loop]); in rxrpc_rxk5_free()
200 kfree(rxk5->authdata); in rxrpc_rxk5_free()
203 kfree(rxk5->ticket); in rxrpc_rxk5_free()
204 kfree(rxk5->ticket2); in rxrpc_rxk5_free()
205 kfree(rxk5); in rxrpc_rxk5_free()
425 struct rxk5_key *rxk5; in rxrpc_instantiate_xdr_rxk5() local
443 rxk5 = kzalloc(sizeof(*rxk5), GFP_KERNEL); in rxrpc_instantiate_xdr_rxk5()
444 if (!rxk5) { in rxrpc_instantiate_xdr_rxk5()
450 token->k5 = rxk5; in rxrpc_instantiate_xdr_rxk5()
453 ret = rxrpc_krb5_decode_principal(&rxk5->client, &xdr, &toklen); in rxrpc_instantiate_xdr_rxk5()
456 ret = rxrpc_krb5_decode_principal(&rxk5->server, &xdr, &toklen); in rxrpc_instantiate_xdr_rxk5()
462 ret = rxrpc_krb5_decode_tagged_data(&rxk5->session, AFSTOKEN_DATA_MAX, in rxrpc_instantiate_xdr_rxk5()
469 rxk5->authtime = be64_to_cpup((const __be64 *) xdr); in rxrpc_instantiate_xdr_rxk5()
471 rxk5->starttime = be64_to_cpup((const __be64 *) xdr); in rxrpc_instantiate_xdr_rxk5()
473 rxk5->endtime = be64_to_cpup((const __be64 *) xdr); in rxrpc_instantiate_xdr_rxk5()
475 rxk5->renew_till = be64_to_cpup((const __be64 *) xdr); in rxrpc_instantiate_xdr_rxk5()
477 rxk5->is_skey = ntohl(*xdr++); in rxrpc_instantiate_xdr_rxk5()
478 rxk5->flags = ntohl(*xdr++); in rxrpc_instantiate_xdr_rxk5()
482 rxk5->authtime, rxk5->starttime, rxk5->endtime, in rxrpc_instantiate_xdr_rxk5()
483 rxk5->renew_till); in rxrpc_instantiate_xdr_rxk5()
484 _debug("is_skey=%x flags=%x", rxk5->is_skey, rxk5->flags); in rxrpc_instantiate_xdr_rxk5()
487 ret = rxrpc_krb5_decode_tagged_array(&rxk5->addresses, in rxrpc_instantiate_xdr_rxk5()
488 &rxk5->n_addresses, in rxrpc_instantiate_xdr_rxk5()
498 ret = rxrpc_krb5_decode_ticket(&rxk5->ticket, &rxk5->ticket_len, in rxrpc_instantiate_xdr_rxk5()
502 ret = rxrpc_krb5_decode_ticket(&rxk5->ticket2, &rxk5->ticket2_len, in rxrpc_instantiate_xdr_rxk5()
510 ret = rxrpc_krb5_decode_tagged_array(&rxk5->authdata, in rxrpc_instantiate_xdr_rxk5()
511 &rxk5->n_authdata, in rxrpc_instantiate_xdr_rxk5()
538 rxrpc_rxk5_free(rxk5); in rxrpc_instantiate_xdr_rxk5()