Lines Matching refs:xi
24 struct ceph_x_info *xi = ac->private; in ceph_x_is_authenticated() local
29 ac->want_keys, need, xi->have_keys); in ceph_x_is_authenticated()
30 return (ac->want_keys & xi->have_keys) == ac->want_keys; in ceph_x_is_authenticated()
35 struct ceph_x_info *xi = ac->private; in ceph_x_should_authenticate() local
40 ac->want_keys, need, xi->have_keys); in ceph_x_should_authenticate()
120 struct ceph_x_info *xi = ac->private; in get_ticket_handler() local
121 struct rb_node *parent = NULL, **p = &xi->ticket_handlers.rb_node; in get_ticket_handler()
140 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler()
147 struct ceph_x_info *xi = ac->private; in remove_ticket_handler() local
150 rb_erase(&th->node, &xi->ticket_handlers); in remove_ticket_handler()
161 struct ceph_x_info *xi = ac->private; in process_one_ticket() local
256 xi->have_keys |= th->service; in process_one_ticket()
456 struct ceph_x_info *xi = ac->private; in ceph_x_validate_tickets() local
459 *pneed = ac->want_keys & ~(xi->have_keys); in ceph_x_validate_tickets()
479 xi->have_keys &= ~service; in ceph_x_validate_tickets()
486 struct ceph_x_info *xi = ac->private; in ceph_x_build_request() local
499 ac->want_keys, xi->have_keys, need); in ceph_x_build_request()
504 void *enc_buf = xi->auth_authorizer.enc_buf; in ceph_x_build_request()
518 blob->server_challenge = cpu_to_le64(xi->server_challenge); in ceph_x_build_request()
519 ret = ceph_x_encrypt(&xi->secret, enc_buf, CEPHX_AU_ENC_BUF_LEN, in ceph_x_build_request()
529 xi->server_challenge, le64_to_cpu(auth->client_challenge), in ceph_x_build_request()
548 ret = ceph_x_build_authorizer(ac, th, &xi->auth_authorizer); in ceph_x_build_request()
551 ceph_encode_copy(&p, xi->auth_authorizer.buf->vec.iov_base, in ceph_x_build_request()
552 xi->auth_authorizer.buf->vec.iov_len); in ceph_x_build_request()
566 struct ceph_x_info *xi = ac->private; in ceph_x_handle_reply() local
576 if (xi->starting) { in ceph_x_handle_reply()
582 xi->server_challenge = le64_to_cpu(sc->server_challenge); in ceph_x_handle_reply()
584 xi->server_challenge); in ceph_x_handle_reply()
585 xi->starting = false; in ceph_x_handle_reply()
586 xi->have_keys &= ~CEPH_ENTITY_TYPE_AUTH; in ceph_x_handle_reply()
596 ret = ceph_x_proc_ticket_reply(ac, &xi->secret, in ceph_x_handle_reply()
613 if (ac->want_keys == xi->have_keys) in ceph_x_handle_reply()
756 struct ceph_x_info *xi = ac->private; in ceph_x_reset() local
759 xi->starting = true; in ceph_x_reset()
760 xi->server_challenge = 0; in ceph_x_reset()
765 struct ceph_x_info *xi = ac->private; in ceph_x_destroy() local
769 ceph_crypto_key_destroy(&xi->secret); in ceph_x_destroy()
771 while ((p = rb_first(&xi->ticket_handlers)) != NULL) { in ceph_x_destroy()
777 ceph_x_authorizer_cleanup(&xi->auth_authorizer); in ceph_x_destroy()
933 struct ceph_x_info *xi; in ceph_x_init() local
938 xi = kzalloc(sizeof(*xi), GFP_NOFS); in ceph_x_init()
939 if (!xi) in ceph_x_init()
948 ret = ceph_crypto_key_clone(&xi->secret, ac->key); in ceph_x_init()
954 xi->starting = true; in ceph_x_init()
955 xi->ticket_handlers = RB_ROOT; in ceph_x_init()
958 ac->private = xi; in ceph_x_init()
963 kfree(xi); in ceph_x_init()