Lines Matching refs: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
33 char *description; /* Proposed key description (or NULL) */
38 time64_t expiry; /* Expiry time of key */
41 typedef int (*request_key_actor_t)(struct key *auth_key, void *aux);
51 bool (*cmp)(const struct key *key,
62 * kernel managed key type definition
91 /* instantiate a key of this type
95 int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
97 /* update a key of this type (optional)
100 * - the key must be locked against read when modifying
102 int (*update)(struct key *key, struct key_preparsed_payload *prep);
114 /* clear some of the data from a key on revokation (optional)
115 * - the key's semaphore will be write-locked by the caller
117 void (*revoke)(struct key *key);
119 /* clear the data from a key (optional) */
120 void (*destroy)(struct key *key);
122 /* describe a key */
123 void (*describe)(const struct key *key, struct seq_file *p);
125 /* read a key's data (optional)
127 * - the key's semaphore will be readlocked by the caller
132 long (*read)(const struct key *key, char *buffer, size_t buflen);
135 * /sbin/request-key (optional)
136 * - key is the key to instantiate
137 * - authkey is the authority to assume when instantiating this key
147 * is known but will never block addition of a key)
152 /* Asymmetric key accessor functions. */
162 struct lock_class_key lock_class; /* key->sem lock class */
170 extern int key_payload_reserve(struct key *key, size_t datalen);
171 extern int key_instantiate_and_link(struct key *key,
174 struct key *keyring,
175 struct key *authkey);
176 extern int key_reject_and_link(struct key *key,
179 struct key *keyring,
180 struct key *authkey);
181 extern void complete_request_key(struct key *authkey, int error);
183 static inline int key_negate_and_link(struct key *key,
185 struct key *keyring,
186 struct key *authkey)
188 return key_reject_and_link(key, timeout, ENOKEY, keyring, authkey);
191 extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep);