Lines Matching refs:key
33 static void rxrpc_destroy(struct key *);
34 static void rxrpc_destroy_s(struct key *);
35 static void rxrpc_describe(const struct key *, struct seq_file *);
36 static long rxrpc_read(const struct key *, char __user *, size_t);
862 static void rxrpc_destroy(struct key *key) in rxrpc_destroy() argument
864 rxrpc_free_token_list(key->payload.data[0]); in rxrpc_destroy()
870 static void rxrpc_destroy_s(struct key *key) in rxrpc_destroy_s() argument
872 if (key->payload.data[0]) { in rxrpc_destroy_s()
873 crypto_free_blkcipher(key->payload.data[0]); in rxrpc_destroy_s()
874 key->payload.data[0] = NULL; in rxrpc_destroy_s()
881 static void rxrpc_describe(const struct key *key, struct seq_file *m) in rxrpc_describe() argument
883 seq_puts(m, key->description); in rxrpc_describe()
891 struct key *key; in rxrpc_request_key() local
909 key = request_key(&key_type_rxrpc, description, NULL); in rxrpc_request_key()
910 if (IS_ERR(key)) { in rxrpc_request_key()
912 _leave(" = %ld", PTR_ERR(key)); in rxrpc_request_key()
913 return PTR_ERR(key); in rxrpc_request_key()
916 rx->key = key; in rxrpc_request_key()
918 _leave(" = 0 [key %x]", key->serial); in rxrpc_request_key()
928 struct key *key; in rxrpc_server_keyring() local
946 key = request_key(&key_type_keyring, description, NULL); in rxrpc_server_keyring()
947 if (IS_ERR(key)) { in rxrpc_server_keyring()
949 _leave(" = %ld", PTR_ERR(key)); in rxrpc_server_keyring()
950 return PTR_ERR(key); in rxrpc_server_keyring()
953 rx->securities = key; in rxrpc_server_keyring()
955 _leave(" = 0 [key %x]", key->serial); in rxrpc_server_keyring()
968 struct key *key; in rxrpc_get_server_data_key() local
978 key = key_alloc(&key_type_rxrpc, "x", in rxrpc_get_server_data_key()
981 if (IS_ERR(key)) { in rxrpc_get_server_data_key()
982 _leave(" = -ENOMEM [alloc %ld]", PTR_ERR(key)); in rxrpc_get_server_data_key()
986 _debug("key %d", key_serial(key)); in rxrpc_get_server_data_key()
996 ret = key_instantiate_and_link(key, &data, sizeof(data), NULL, NULL); in rxrpc_get_server_data_key()
1000 conn->key = key; in rxrpc_get_server_data_key()
1001 _leave(" = 0 [%d]", key_serial(key)); in rxrpc_get_server_data_key()
1005 key_revoke(key); in rxrpc_get_server_data_key()
1006 key_put(key); in rxrpc_get_server_data_key()
1019 struct key *rxrpc_get_null_key(const char *keyname) in rxrpc_get_null_key()
1022 struct key *key; in rxrpc_get_null_key() local
1025 key = key_alloc(&key_type_rxrpc, keyname, in rxrpc_get_null_key()
1028 if (IS_ERR(key)) in rxrpc_get_null_key()
1029 return key; in rxrpc_get_null_key()
1031 ret = key_instantiate_and_link(key, NULL, 0, NULL, NULL); in rxrpc_get_null_key()
1033 key_revoke(key); in rxrpc_get_null_key()
1034 key_put(key); in rxrpc_get_null_key()
1038 return key; in rxrpc_get_null_key()
1046 static long rxrpc_read(const struct key *key, in rxrpc_read() argument
1060 if (memcmp(key->description, "afs@", 4) != 0) in rxrpc_read()
1062 cnlen = strlen(key->description + 4); in rxrpc_read()
1073 for (token = key->payload.data[0]; token; token = token->next) { in rxrpc_read()
1162 ENCODE_DATA(cnlen, key->description + 4); /* cellname */ in rxrpc_read()
1166 for (token = key->payload.data[0]; token; token = token->next) { in rxrpc_read()