Lines Matching refs:key

2 /* Authentication token and access key management internal defs
14 #include <linux/key-type.h>
95 extern int __key_link_lock(struct key *keyring,
97 extern int __key_move_lock(struct key *l_keyring, struct key *u_keyring,
99 extern int __key_link_begin(struct key *keyring,
102 extern int __key_link_check_live_key(struct key *keyring, struct key *key);
103 extern void __key_link(struct key *keyring, struct key *key,
105 extern void __key_link_end(struct key *keyring,
134 extern bool key_default_cmp(const struct key *key,
142 extern struct key *find_keyring_by_name(const char *name, bool uid_keyring);
144 extern int look_up_user_keyrings(struct key **, struct key **);
145 extern struct key *get_user_session_keyring_rcu(const struct cred *);
148 extern int install_session_keyring_to_cred(struct cred *, struct key *);
150 extern struct key *request_key_and_link(struct key_type *type,
156 struct key *dest_keyring,
159 extern bool lookup_user_key_possessed(const struct key *key,
167 extern void keyring_gc(struct key *keyring, time64_t limit);
168 extern void keyring_restriction_gc(struct key *keyring,
170 void key_set_expiry(struct key *key, time64_t expiry);
179 static inline void notify_key(struct key *key,
187 .key_id = key_serial(key),
191 post_watch_notification(key->watchers, &n.watch, current_cred(),
197 * Check to see whether permission is granted to use a key in the desired way.
206 extern struct key *request_key_auth_new(struct key *target,
210 struct key *dest_keyring);
211 struct request_key_auth *request_key_auth_get(struct key *authkey);
214 extern struct key *key_get_instantiation_authkey(key_serial_t target_id);
217 * Determine whether a key is dead.
219 static inline bool key_is_dead(const struct key *key, time64_t limit)
221 time64_t expiry = key->expiry;
224 if (!(key->type->flags & KEY_TYPE_INSTANT_REAP))
231 key->flags & ((1 << KEY_FLAG_DEAD) |
233 key->domain_tag->removed;
362 * Debugging key validation
365 extern void __key_check(const struct key *);
367 static inline void key_check(const struct key *key)
369 if (key && (IS_ERR(key) || key->magic != KEY_DEBUG_MAGIC))
370 __key_check(key);
375 #define key_check(key) do {} while(0)