Lines Matching full:key

2 /* Definitions for key type implementations
11 #include <linux/key.h>
20 * Pre-parsed payload, used by key add, update and instantiate.
24 * def_datalen from the key type. Then if the preparse() op is provided by the
25 * key type, that will be called. Then the struct will be passed to the
32 char *description; /* Proposed key description (or NULL) */
37 time64_t expiry; /* Expiry time of key */
40 typedef int (*request_key_actor_t)(struct key *auth_key, void *aux);
50 bool (*cmp)(const struct key *key,
61 * kernel managed key type definition
89 /* instantiate a key of this type
93 int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
95 /* update a key of this type (optional)
98 * - the key must be locked against read when modifying
100 int (*update)(struct key *key, struct key_preparsed_payload *prep);
112 /* clear some of the data from a key on revokation (optional)
113 * - the key's semaphore will be write-locked by the caller
115 void (*revoke)(struct key *key);
117 /* clear the data from a key (optional) */
118 void (*destroy)(struct key *key);
120 /* describe a key */
121 void (*describe)(const struct key *key, struct seq_file *p);
123 /* read a key's data (optional)
125 * - the key's semaphore will be readlocked by the caller
130 long (*read)(const struct key *key, char *buffer, size_t buflen);
133 * /sbin/request-key (optional)
134 * - key is the key to instantiate
135 * - authkey is the authority to assume when instantiating this key
145 * is known but will never block addition of a key)
150 /* Asymmetric key accessor functions. */
160 struct lock_class_key lock_class; /* key->sem lock class */
168 extern int key_payload_reserve(struct key *key, size_t datalen);
169 extern int key_instantiate_and_link(struct key *key,
172 struct key *keyring,
173 struct key *authkey);
174 extern int key_reject_and_link(struct key *key,
177 struct key *keyring,
178 struct key *authkey);
179 extern void complete_request_key(struct key *authkey, int error);
181 static inline int key_negate_and_link(struct key *key, in key_negate_and_link() argument
183 struct key *keyring, in key_negate_and_link()
184 struct key *authkey) in key_negate_and_link()
186 return key_reject_and_link(key, timeout, ENOKEY, keyring, authkey); in key_negate_and_link()
189 extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep);