Lines Matching refs:key

28 static void rxrpc_destroy(struct key *);
29 static void rxrpc_describe(const struct key *, struct seq_file *);
30 static long rxrpc_read(const struct key *, char *, size_t);
172 const __be32 *ticket, *key; in rxrpc_preparse_xdr_yfs_rxgk() local
183 key = xdr + (6 * 2 + 1); in rxrpc_preparse_xdr_yfs_rxgk()
184 keylen = ntohl(key[-1]); in rxrpc_preparse_xdr_yfs_rxgk()
224 token->rxgk->key.len = ntohl(key[-1]); in rxrpc_preparse_xdr_yfs_rxgk()
225 token->rxgk->key.data = token->rxgk->_key; in rxrpc_preparse_xdr_yfs_rxgk()
236 memcpy(token->rxgk->key.data, key, token->rxgk->key.len); in rxrpc_preparse_xdr_yfs_rxgk()
251 _debug("KLEN: %u", token->rxgk->key.len); in rxrpc_preparse_xdr_yfs_rxgk()
253 _debug("KEY0: %*phN", token->rxgk->key.len, token->rxgk->key.data); in rxrpc_preparse_xdr_yfs_rxgk()
575 static void rxrpc_destroy(struct key *key) in rxrpc_destroy() argument
577 rxrpc_free_token_list(key->payload.data[0]); in rxrpc_destroy()
583 static void rxrpc_describe(const struct key *key, struct seq_file *m) in rxrpc_describe() argument
588 seq_puts(m, key->description); in rxrpc_describe()
590 for (token = key->payload.data[0]; token; token = token->next) { in rxrpc_describe()
614 struct key *key; in rxrpc_request_key() local
626 key = request_key_net(&key_type_rxrpc, description, sock_net(&rx->sk), NULL); in rxrpc_request_key()
627 if (IS_ERR(key)) { in rxrpc_request_key()
629 _leave(" = %ld", PTR_ERR(key)); in rxrpc_request_key()
630 return PTR_ERR(key); in rxrpc_request_key()
633 rx->key = key; in rxrpc_request_key()
635 _leave(" = 0 [key %x]", key->serial); in rxrpc_request_key()
648 struct key *key; in rxrpc_get_server_data_key() local
658 key = key_alloc(&key_type_rxrpc, "x", in rxrpc_get_server_data_key()
661 if (IS_ERR(key)) { in rxrpc_get_server_data_key()
662 _leave(" = -ENOMEM [alloc %ld]", PTR_ERR(key)); in rxrpc_get_server_data_key()
666 _debug("key %d", key_serial(key)); in rxrpc_get_server_data_key()
676 ret = key_instantiate_and_link(key, &data, sizeof(data), NULL, NULL); in rxrpc_get_server_data_key()
680 conn->key = key; in rxrpc_get_server_data_key()
681 _leave(" = 0 [%d]", key_serial(key)); in rxrpc_get_server_data_key()
685 key_revoke(key); in rxrpc_get_server_data_key()
686 key_put(key); in rxrpc_get_server_data_key()
701 struct key *rxrpc_get_null_key(const char *keyname) in rxrpc_get_null_key()
704 struct key *key; in rxrpc_get_null_key() local
707 key = key_alloc(&key_type_rxrpc, keyname, in rxrpc_get_null_key()
710 if (IS_ERR(key)) in rxrpc_get_null_key()
711 return key; in rxrpc_get_null_key()
713 ret = key_instantiate_and_link(key, NULL, 0, NULL, NULL); in rxrpc_get_null_key()
715 key_revoke(key); in rxrpc_get_null_key()
716 key_put(key); in rxrpc_get_null_key()
720 return key; in rxrpc_get_null_key()
728 static long rxrpc_read(const struct key *key, in rxrpc_read() argument
740 if (memcmp(key->description, "afs@", 4) != 0) in rxrpc_read()
742 cnlen = strlen(key->description + 4); in rxrpc_read()
753 for (token = key->payload.data[0]; token; token = token->next) { in rxrpc_read()
767 toksize += RND(token->rxgk->key.len); in rxrpc_read()
826 ENCODE_DATA(cnlen, key->description + 4); /* cellname */ in rxrpc_read()
830 for (token = key->payload.data[0]; token; token = token->next) { in rxrpc_read()
860 ENCODE_DATA(token->rxgk->key.len, token->rxgk->key.data); in rxrpc_read()