Lines Matching refs:xi
24 struct ceph_x_info *xi = ac->private; in ceph_x_is_authenticated() local
29 missing = ac->want_keys & ~xi->have_keys; in ceph_x_is_authenticated()
32 ac->want_keys, xi->have_keys, missing, !missing); in ceph_x_is_authenticated()
38 struct ceph_x_info *xi = ac->private; in ceph_x_should_authenticate() local
43 ac->want_keys, xi->have_keys, need, !!need); in ceph_x_should_authenticate()
123 struct ceph_x_info *xi = ac->private; in get_ticket_handler() local
124 struct rb_node *parent = NULL, **p = &xi->ticket_handlers.rb_node; in get_ticket_handler()
143 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler()
150 struct ceph_x_info *xi = ac->private; in remove_ticket_handler() local
153 rb_erase(&th->node, &xi->ticket_handlers); in remove_ticket_handler()
164 struct ceph_x_info *xi = ac->private; in process_one_ticket() local
260 xi->have_keys |= th->service; in process_one_ticket()
461 struct ceph_x_info *xi = ac->private; in ceph_x_validate_tickets() local
464 *pneed = ac->want_keys & ~(xi->have_keys); in ceph_x_validate_tickets()
484 xi->have_keys &= ~service; in ceph_x_validate_tickets()
491 struct ceph_x_info *xi = ac->private; in ceph_x_build_request() local
504 xi->have_keys, need); in ceph_x_build_request()
508 void *enc_buf = xi->auth_authorizer.enc_buf; in ceph_x_build_request()
523 blob->server_challenge = cpu_to_le64(xi->server_challenge); in ceph_x_build_request()
524 ret = ceph_x_encrypt(&xi->secret, enc_buf, CEPHX_AU_ENC_BUF_LEN, in ceph_x_build_request()
534 xi->server_challenge, le64_to_cpu(auth->client_challenge), in ceph_x_build_request()
551 ret = ceph_x_build_authorizer(ac, th, &xi->auth_authorizer); in ceph_x_build_request()
559 xi->auth_authorizer.buf->vec.iov_base, in ceph_x_build_request()
560 xi->auth_authorizer.buf->vec.iov_len, e_range); in ceph_x_build_request()
605 struct ceph_x_info *xi = ac->private; in handle_auth_session_key() local
612 ret = ceph_x_proc_ticket_reply(ac, &xi->secret, p, end); in handle_auth_session_key()
670 struct ceph_x_info *xi = ac->private; in ceph_x_handle_reply() local
678 if (xi->starting) { in ceph_x_handle_reply()
684 xi->server_challenge = le64_to_cpu(sc->server_challenge); in ceph_x_handle_reply()
686 xi->server_challenge); in ceph_x_handle_reply()
687 xi->starting = false; in ceph_x_handle_reply()
688 xi->have_keys &= ~CEPH_ENTITY_TYPE_AUTH; in ceph_x_handle_reply()
718 if (ac->want_keys == xi->have_keys) in ceph_x_handle_reply()
906 struct ceph_x_info *xi = ac->private; in ceph_x_reset() local
909 xi->starting = true; in ceph_x_reset()
910 xi->server_challenge = 0; in ceph_x_reset()
915 struct ceph_x_info *xi = ac->private; in ceph_x_destroy() local
919 ceph_crypto_key_destroy(&xi->secret); in ceph_x_destroy()
921 while ((p = rb_first(&xi->ticket_handlers)) != NULL) { in ceph_x_destroy()
927 ceph_x_authorizer_cleanup(&xi->auth_authorizer); in ceph_x_destroy()
1089 struct ceph_x_info *xi; in ceph_x_init() local
1094 xi = kzalloc(sizeof(*xi), GFP_NOFS); in ceph_x_init()
1095 if (!xi) in ceph_x_init()
1104 ret = ceph_crypto_key_clone(&xi->secret, ac->key); in ceph_x_init()
1110 xi->starting = true; in ceph_x_init()
1111 xi->ticket_handlers = RB_ROOT; in ceph_x_init()
1114 ac->private = xi; in ceph_x_init()
1119 kfree(xi); in ceph_x_init()