Home
last modified time | relevance | path

Searched refs:keyring (Results 1 – 25 of 72) sorted by relevance

123

/linux/security/keys/
H A Dkeyring.c20 #include <keys/keyring-type.h>
73 * The keyring key type definition. Keyrings are simply keys of this type and
79 static int keyring_instantiate(struct key *keyring,
81 static void keyring_revoke(struct key *keyring);
82 static void keyring_destroy(struct key *keyring);
83 static void keyring_describe(const struct key *keyring, struct seq_file *m);
84 static long keyring_read(const struct key *keyring,
88 .name = "keyring",
107 * Publish the name of a keyring so that it can be found by name (if it has in keyring_publish_name() argument
110 static void keyring_publish_name(struct key *keyring) in keyring_publish_name()
140 keyring_instantiate(struct key * keyring,struct key_preparsed_payload * prep) keyring_instantiate() argument
414 keyring_destroy(struct key * keyring) keyring_destroy() argument
439 keyring_describe(const struct key * keyring,struct seq_file * m) keyring_describe() argument
483 keyring_read(const struct key * keyring,char * buffer,size_t buflen) keyring_read() argument
525 struct key *keyring; keyring_alloc() local
556 restrict_link_reject(struct key * keyring,const struct key_type * type,const union key_payload * payload,struct key * restriction_key) restrict_link_reject() argument
648 search_keyring(struct key * keyring,struct keyring_search_context * ctx) search_keyring() argument
665 search_nested_keyrings(struct key * keyring,struct keyring_search_context * ctx) search_nested_keyrings() argument
669 struct key *keyring; search_nested_keyrings() member
907 struct key *keyring; keyring_search_rcu() local
942 keyring_search(key_ref_t keyring,struct key_type * type,const char * description,bool recurse) keyring_search() argument
1029 struct key *keyring; keyring_restrict() local
1106 struct key *keyring, *key; find_key_to_update() local
1150 struct key *keyring; find_keyring_by_name() local
1242 __key_link_lock(struct key * keyring,const struct keyring_index_key * index_key) __key_link_lock() argument
1298 __key_link_begin(struct key * keyring,const struct keyring_index_key * index_key,struct assoc_array_edit ** _edit) __key_link_begin() argument
1356 __key_link_check_live_key(struct key * keyring,struct key * key) __key_link_check_live_key() argument
1373 __key_link(struct key * keyring,struct key * key,struct assoc_array_edit ** _edit) __key_link() argument
1388 __key_link_end(struct key * keyring,const struct keyring_index_key * index_key,struct assoc_array_edit * edit) __key_link_end() argument
1413 __key_link_check_restriction(struct key * keyring,struct key * key) __key_link_check_restriction() argument
1441 key_link(struct key * keyring,struct key * key) key_link() argument
1477 __key_unlink_lock(struct key * keyring) __key_unlink_lock() argument
1490 __key_unlink_begin(struct key * keyring,struct key * key,struct assoc_array_edit ** _edit) __key_unlink_begin() argument
1512 __key_unlink(struct key * keyring,struct key * key,struct assoc_array_edit ** _edit) __key_unlink() argument
1524 __key_unlink_end(struct key * keyring,struct key * key,struct assoc_array_edit * edit) __key_unlink_end() argument
1551 key_unlink(struct key * keyring,struct key * key) key_unlink() argument
1653 keyring_clear(struct key * keyring) keyring_clear() argument
1684 keyring_revoke(struct key * keyring) keyring_revoke() argument
1722 keyring_gc(struct key * keyring,time64_t limit) keyring_gc() argument
1767 keyring_restriction_gc(struct key * keyring,struct key_type * dead_type) keyring_restriction_gc() argument
[all...]
H A Dprocess_keys.c22 /* Session keyring create vs join semaphore */
25 /* BPF keyring reachable through KEY_SPEC_BPF_KEYRING */
28 /* dm-verity keyring reachable through KEY_SPEC_DM_VERITY_KEYRING */
32 /* fs-verity keyring reachable through KEY_SPEC_FS_VERITY_KEYRING */
46 * Get or create a user register keyring. in get_user_register()
57 /* Make sure there's a register keyring. It gets owned by the in get_user_register()
76 /* We don't return a ref since the keyring is pinned by the user_ns */ in look_up_user_keyrings()
107 /* Get the user keyring. Note that there may be one in existence in look_up_user_keyrings()
132 /* Get a default session keyring (which might also exist already) */ in look_up_user_keyrings()
148 /* We install a link from the user session keyring t in look_up_user_keyrings()
223 struct key *keyring; install_thread_keyring_to_cred() local
270 struct key *keyring; install_process_keyring_to_cred() local
317 install_session_keyring_to_cred(struct cred * cred,struct key * keyring) install_session_keyring_to_cred() argument
356 install_session_keyring(struct key * keyring) install_session_keyring() argument
841 struct key *keyring; join_session_keyring() local
[all...]
H A Dkey.c207 * keyring is destroyed, so it must be dynamically allocated.
424 * Instantiate a key and link it into the target keyring atomically. Must be
425 * called with the target keyring's semaphore writelocked. The caller must
432 struct key *keyring, in __key_instantiate_and_link()
439 key_check(keyring); in __key_instantiate_and_link()
461 /* and link it into the destination keyring */ in __key_instantiate_and_link()
462 if (keyring) { in __key_instantiate_and_link()
463 if (test_bit(KEY_FLAG_KEEP, &keyring->flags)) in __key_instantiate_and_link()
466 __key_link(keyring, key, _edit); in __key_instantiate_and_link()
489 * key_instantiate_and_link - Instantiate a key and link it into the keyring
429 __key_instantiate_and_link(struct key * key,struct key_preparsed_payload * prep,struct key * keyring,struct key * authkey,struct assoc_array_edit ** _edit) __key_instantiate_and_link() argument
502 key_instantiate_and_link(struct key * key,const void * data,size_t datalen,struct key * keyring,struct key * authkey) key_instantiate_and_link() argument
578 key_reject_and_link(struct key * key,unsigned timeout,unsigned error,struct key * keyring,struct key * authkey) key_reject_and_link() argument
821 struct key *keyring, *key = NULL; __key_create_or_update() local
[all...]
H A Dinternal.h83 #define KEYQUOTA_LINK_BYTES 4 /* a link in a keyring is worth 4 bytes */
97 extern int __key_link_lock(struct key *keyring,
101 extern int __key_link_begin(struct key *keyring,
104 extern int __key_link_check_live_key(struct key *keyring, struct key *key);
105 extern void __key_link(struct key *keyring, struct key *key,
107 extern void __key_link_end(struct key *keyring,
169 extern void keyring_gc(struct key *keyring, time64_t limit);
170 extern void keyring_restriction_gc(struct key *keyring,
/linux/security/integrity/
H A Ddigsig.c22 static struct key *keyring[INTEGRITY_KEYRING_MAX]; variable
47 if (!keyring[id]) { in integrity_keyring_from_id()
48 keyring[id] = in integrity_keyring_from_id()
50 if (IS_ERR(keyring[id])) { in integrity_keyring_from_id()
51 int err = PTR_ERR(keyring[id]); in integrity_keyring_from_id()
52 pr_err("no %s keyring: %d\n", keyring_name[id], err); in integrity_keyring_from_id()
53 keyring[id] = NULL; in integrity_keyring_from_id()
58 return keyring[id]; in integrity_keyring_from_id()
64 struct key *keyring; in integrity_digsig_verify() local
69 keyring in integrity_digsig_verify()
89 struct key *keyring; integrity_modsig_verify() local
[all...]
H A DKconfig29 to "lock" certain keyring to prevent adding new keys.
54 keyring.
57 bool "Provide keyring for platform/firmware trusted keys"
61 Provide a separate, distinct keyring for platform trusted keys, which
67 bool "Provide a keyring to which Machine Owner Keys may be added"
73 If set, provide a keyring to which Machine Owner Keys (MOK) may
74 be added. This keyring shall contain just MOK keys. Unlike keys
75 in the platform keyring, keys contained in the .machine keyring will
83 The .machine keyring can be configured to enforce CA restriction
85 and all Machine Owner Keys (MOK) are added to the machine keyring.
[all …]
H A Ddigsig_asymmetric.c22 static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid) in request_asymmetric_key() argument
43 if (keyring) { in request_asymmetric_key()
44 /* search in specific keyring */ in request_asymmetric_key()
47 kref = keyring_search(make_key_ref(keyring, 1), in request_asymmetric_key()
58 if (keyring) in request_asymmetric_key()
59 pr_err_ratelimited("Request for unknown key '%s' in '%s' keyring. err %ld\n", in request_asymmetric_key()
60 name, keyring->description, in request_asymmetric_key()
135 int asymmetric_verify(struct key *keyring, const char *sig,
146 key = request_asymmetric_key(keyring, be32_to_cpu(hdr->keyid));
260 int asymmetric_verify_v3(struct key *keyring, cons
82 asymmetric_verify(struct key * keyring,const char * sig,int siglen,const char * data,int datalen) asymmetric_verify() argument
[all...]
/linux/include/keys/
H A Dsystem_keyring.h22 extern int restrict_link_by_builtin_trusted(struct key *keyring,
30 extern __init int load_module_cert(struct key *keyring);
36 static inline __init int load_module_cert(struct key *keyring) in load_module_cert() argument
45 struct key *keyring,
49 int restrict_link_by_digsig_builtin_and_secondary(struct key *keyring,
68 extern void __init set_machine_trusted_keys(struct key *keyring);
71 static inline void __init set_machine_trusted_keys(struct key *keyring) in set_machine_trusted_keys() argument
126 extern void __init set_platform_trusted_keys(struct key *keyring);
128 static inline void set_platform_trusted_keys(struct key *keyring) in set_platform_trusted_keys() argument
/linux/crypto/asymmetric_keys/
H A Dselftest.c21 struct key *keyring; in fips_signature_selftest() local
26 keyring = keyring_alloc(".certs_selftest", in fips_signature_selftest()
33 if (IS_ERR(keyring)) in fips_signature_selftest()
34 panic("Can't allocate certs %s selftest keyring: %ld\n", name, PTR_ERR(keyring)); in fips_signature_selftest()
36 ret = x509_load_certificate_list(keys, keys_len, keyring); in fips_signature_selftest()
52 ret = pkcs7_validate_trust(pkcs7, keyring); in fips_signature_selftest()
58 key_put(keyring); in fips_signature_selftest()
/linux/drivers/nvme/common/
H A Dkeyring.c12 #include <linux/nvme-keyring.h>
92 static struct key *nvme_tls_psk_lookup(struct key *keyring, in nvme_tls_psk_lookup()
108 if (!keyring) in nvme_tls_psk_lookup()
109 keyring = nvme_keyring; in nvme_tls_psk_lookup()
110 keyring_id = key_serial(keyring); in nvme_tls_psk_lookup()
111 pr_debug("keyring %x lookup tls psk '%s'\n", in nvme_tls_psk_lookup()
113 keyref = keyring_search(make_key_ref(keyring, true), in nvme_tls_psk_lookup()
129 * @keyring: Keyring holding the TLS PSK
138 * from @hmac_id, @hostnqn, @subnqn, and @digest in the keyring given
139 * by @keyring
91 nvme_tls_psk_lookup(struct key * keyring,const char * hostnqn,const char * subnqn,u8 hmac,u8 psk_ver,bool generated) nvme_tls_psk_lookup() argument
142 nvme_tls_psk_refresh(struct key * keyring,const char * hostnqn,const char * subnqn,u8 hmac_id,u8 * data,size_t data_len,const char * digest) nvme_tls_psk_refresh() argument
231 nvme_tls_psk_default(struct key * keyring,const char * hostnqn,const char * subnqn) nvme_tls_psk_default() argument
[all...]
/linux/Documentation/security/
H A Ddigsig.rst63 * @keyring: keyring to search key in
75 int digsig_verify(struct key *keyring, const char *sig, int siglen,
82 to generate signatures, to load keys into the kernel keyring.
84 When the key is added to the kernel keyring, the keyid defines the name
91 -3 --alswrv 0 0 keyring: _ses
92 603976250 --alswrv 0 -1 \_ keyring: _uid.0
95 170323636 --alswrv 0 0 \_ keyring: _module
96 548221616 --alswrv 0 0 \_ keyring: _ima
97 128198054 --alswrv 0 0 \_ keyring: _evm
100 1 key in keyring:
/linux/Documentation/security/keys/
H A Dcore.rst10 other keys. Processes each have three standard keyring subscriptions that a
68 actual "key". In the case of a keyring, this is a list of keys to which
69 the keyring links; in the case of a user-defined key, it's an arbitrary
116 (+) "keyring"
140 * Each process subscribes to three keyrings: a thread-specific keyring, a
141 process-specific keyring, and a session-specific keyring.
143 The thread-specific keyring is discarded from the child when any sort of
144 clone, fork, vfork or execve occurs. A new keyring is created only when
147 The process-specific keyring i
[all...]
H A Drequest-key.rst46 does not need to link the key to a keyring to prevent it from being immediately
63 The userspace interface links the key to a keyring associated with the process
96 keyring that contains a link to auth key V.
104 Kerberos TGT key). It just requests the appropriate key, and the keyring
105 search notes that the session keyring has auth key V in its bottom level.
152 A search of any particular keyring proceeds in the following fashion:
155 firstly calls key_permission(SEARCH) on the keyring it's starting with,
158 2) It considers all the non-keyring keys within that keyring and, if any key
164 3) It then considers all the keyring-type keys in the keyring it's currently
165 searching. It calls key_permission(SEARCH) on each keyring, and if this
[all …]
/linux/fs/smb/client/
H A Dcifs_spnego.c197 struct key *keyring; in init_cifs_spnego() local
212 keyring = keyring_alloc(".cifs_spnego", in init_cifs_spnego()
217 if (IS_ERR(keyring)) { in init_cifs_spnego()
218 ret = PTR_ERR(keyring); in init_cifs_spnego()
230 set_bit(KEY_FLAG_ROOT_CAN_CLEAR, &keyring->flags); in init_cifs_spnego()
231 cred->thread_keyring = keyring; in init_cifs_spnego()
235 cifs_dbg(FYI, "cifs spnego keyring: %d\n", key_serial(keyring)); in init_cifs_spnego()
239 key_put(keyring); in init_cifs_spnego()
/linux/net/rxrpc/
H A Drxperf.c550 * Add an rxkad key to the security keyring. in rxperf_process_call()
552 static int rxperf_add_rxkad_key(struct key *keyring)
557 kref = key_create_or_update(make_key_ref(keyring, true), in rxperf_add_rxkad_key()
571 ret = key_link(keyring, key_ref_to_ptr(kref)); in rxperf_add_rxkad_key()
580 * Add a yfs-rxgk key to the security keyring. in rxperf_add_rxkad_key()
582 static int rxperf_add_yfs_rxgk_key(struct key *keyring, u32 enctype)
599 kref = key_create_or_update(make_key_ref(keyring, true), in rxperf_add_yfs_rxgk_key()
611 ret = key_link(keyring, key_ref_to_ptr(kref)); in rxperf_add_yfs_rxgk_key()
624 struct key *keyring;
633 keyring in rxperf_init()
556 rxperf_add_rxkad_key(struct key * keyring) rxperf_add_rxkad_key() argument
586 rxperf_add_yfs_rxgk_key(struct key * keyring,u32 enctype) rxperf_add_yfs_rxgk_key() argument
628 struct key *keyring; rxperf_init() local
[all...]
/linux/security/integrity/ima/
H A Dima_asymmetric_keys.c29 void ima_post_key_create_or_update(struct key *keyring, struct key *key, in ima_post_key_create_or_update() argument
43 queued = ima_queue_key(keyring, payload, payload_len); in ima_post_key_create_or_update()
64 keyring->description, KEY_CHECK, 0, in ima_post_key_create_or_update()
65 keyring->description, false, NULL, 0); in ima_post_key_create_or_update()
H A Dima_queue_keys.c67 static struct ima_key_entry *ima_alloc_key_entry(struct key *keyring, in ima_alloc_key_entry() argument
78 entry->keyring_name = kstrdup(keyring->description, in ima_alloc_key_entry()
94 keyring->description, in ima_alloc_key_entry()
104 bool ima_queue_key(struct key *keyring, const void *payload, in ima_queue_key() argument
110 entry = ima_alloc_key_entry(keyring, payload, payload_len); in ima_queue_key()
/linux/scripts/
H A Dextract-sys-certs.pl21 my $keyring = $ARGV[1];
154 open FD, ">$keyring" || die $keyring;
157 die "$keyring" if (!defined($len));
158 die "Short write on $keyring\n" if ($len != $size);
159 close(FD) || die $keyring;
/linux/fs/crypto/
H A Dkeyring.c3 * Filesystem-level keyring for fscrypt
10 * filesystem-level keyring, including the ioctls:
77 * that concurrent keyring lookups can no longer find it. in fscrypt_put_master_key()
93 * fscrypt_master_key struct by removing it from the keyring and in fscrypt_put_master_key_activeref()
199 struct fscrypt_keyring *keyring; in allocate_filesystem_keyring()
204 keyring = kzalloc_obj(*keyring);
205 if (!keyring)
207 spin_lock_init(&keyring->lock);
213 smp_store_release(&sb->s_master_keys, keyring);
186 struct fscrypt_keyring *keyring; allocate_filesystem_keyring() local
216 struct fscrypt_keyring *keyring = sb->s_master_keys; fscrypt_destroy_keyring() local
247 fscrypt_mk_hash_bucket(struct fscrypt_keyring * keyring,const struct fscrypt_key_specifier * mk_spec) fscrypt_mk_hash_bucket() argument
271 struct fscrypt_keyring *keyring; fscrypt_find_master_key() local
415 struct fscrypt_keyring *keyring = sb->s_master_keys; add_new_master_key() local
[all...]
/linux/include/linux/
H A Dnvme-keyring.h13 struct key *nvme_tls_psk_refresh(struct key *keyring,
16 key_serial_t nvme_tls_psk_default(struct key *keyring,
22 static inline struct key *nvme_tls_psk_refresh(struct key *keyring, in nvme_tls_psk_refresh() argument
28 static inline key_serial_t nvme_tls_psk_default(struct key *keyring, in nvme_tls_psk_default() argument
H A Dkey.h44 #define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */
45 #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */
46 #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
47 #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */
85 KEY_NEED_SEARCH, /* Require permission to search (keyring) or find (key) */
113 atomic64_t index_id; /* Opaque keyring index ID */
195 * authentication token / access credential / keyring
218 time64_t last_used_at; /* last time used for LRU keyring discard */
244 #define KEY_FLAG_UID_KEYRING 9 /* set if key is a user or user session keyring */
278 /* This is set on a keyring t
[all...]
H A Dkey-type.h147 /* Look up a keyring access restriction (optional)
164 atomic64_t index_id; /* Opaque keyring index ID */
178 struct key *keyring,
183 struct key *keyring,
189 struct key *keyring, in key_negate_and_link()
192 return key_reject_and_link(key, timeout, ENOKEY, keyring, authkey); in key_negate_and_link()
188 key_negate_and_link(struct key * key,unsigned timeout,struct key * keyring,struct key * authkey) key_negate_and_link() argument
/linux/net/dns_resolver/
H A Ddns_key.c325 struct key *keyring; in init_dns_resolver() local
338 keyring = keyring_alloc(".dns_resolver", in init_dns_resolver()
343 if (IS_ERR(keyring)) { in init_dns_resolver()
344 ret = PTR_ERR(keyring); in init_dns_resolver()
354 set_bit(KEY_FLAG_ROOT_CAN_CLEAR, &keyring->flags); in init_dns_resolver()
355 cred->thread_keyring = keyring; in init_dns_resolver()
359 kdebug("DNS resolver keyring: %d\n", key_serial(keyring)); in init_dns_resolver()
363 key_put(keyring); in init_dns_resolver()
/linux/Documentation/crypto/
H A Dasymmetric-keys.rst338 1) Restrict using the kernel builtin trusted keyring
343 The kernel builtin trusted keyring will be searched for the signing key.
344 If the builtin trusted keyring is not configured, all links will be
354 signing key. If the secondary trusted keyring is not configured, this
359 3) Restrict using a separate key or keyring
362 - "key_or_keyring:<key or keyring serial number>[:chain]"
368 serial number for a keyring.
371 within the destination keyring will also be searched for signing keys.
373 certificate in order (starting closest to the root) to a keyring. For
374 instance, one keyring can be populated with links to a set of root
[all …]
/linux/certs/
H A Dsystem_keyring.c187 void __init set_machine_trusted_keys(struct key *keyring) in set_machine_trusted_keys() argument
189 machine_trusted_keys = keyring; in set_machine_trusted_keys()
265 __init int load_module_cert(struct key *keyring) in load_module_cert() argument
273 module_cert_size, keyring); in load_module_cert()
424 void __init set_platform_trusted_keys(struct key *keyring) in set_platform_trusted_keys() argument
426 platform_trusted_keys = keyring; in set_platform_trusted_keys()

123