Home
last modified time | relevance | path

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

1234

/linux/security/keys/
A Dkeyring.c531 key_put(keyring); in keyring_alloc()
536 return keyring; in keyring_alloc()
801 stack[sp].keyring = keyring; in search_nested_keyrings()
807 keyring = key; in search_nested_keyrings()
848 keyring = stack[sp].keyring; in search_nested_keyrings()
913 key_check(keyring); in keyring_search_rcu()
1189 return keyring; in find_keyring_by_name()
1412 if (!keyring->restrict_link || !keyring->restrict_link->check) in __key_link_check_restriction()
1443 kenter("{%d,%d}", keyring->serial, refcount_read(&keyring->usage)); in key_link()
1723 kenter("%x{%s}", keyring->serial, keyring->description ?: ""); in keyring_gc()
[all …]
A Dprocess_keys.c223 struct key *keyring; in install_thread_keyring_to_cred() local
232 if (IS_ERR(keyring)) in install_thread_keyring_to_cred()
270 struct key *keyring; in install_process_keyring_to_cred() local
279 if (IS_ERR(keyring)) in install_process_keyring_to_cred()
325 if (!keyring) { in install_session_keyring_to_cred()
333 if (IS_ERR(keyring)) in install_session_keyring_to_cred()
336 __key_get(keyring); in install_session_keyring_to_cred()
841 struct key *keyring; in join_session_keyring() local
893 ret = keyring->serial; in join_session_keyring()
894 key_put(keyring); in join_session_keyring()
[all …]
A Dkey.c435 key_check(keyring); in __key_instantiate_and_link()
457 if (keyring) { in __key_instantiate_and_link()
501 struct key *keyring, in key_instantiate_and_link() argument
520 if (keyring) { in key_instantiate_and_link()
529 if (keyring->restrict_link && keyring->restrict_link->check) { in key_instantiate_and_link()
542 if (keyring) in key_instantiate_and_link()
577 struct key *keyring, in key_reject_and_link() argument
584 key_check(keyring); in key_reject_and_link()
589 if (keyring) { in key_reject_and_link()
590 if (keyring->restrict_link) in key_reject_and_link()
[all …]
A Dinternal.h95 extern int __key_link_lock(struct key *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,
167 extern void keyring_gc(struct key *keyring, time64_t limit);
168 extern void keyring_restriction_gc(struct key *keyring,
/linux/security/integrity/
A Ddigsig.c47 if (!keyring[id]) { in integrity_keyring_from_id()
48 keyring[id] = 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
70 if (IS_ERR(keyring)) in integrity_digsig_verify()
71 return PTR_ERR(keyring); in integrity_digsig_verify()
89 struct key *keyring; in integrity_modsig_verify() local
92 if (IS_ERR(keyring)) in integrity_modsig_verify()
112 keyring[id] = NULL; in __integrity_init_keyring()
[all …]
A DKconfig29 to "lock" certain keyring to prevent adding new keys.
53 keyring.
56 bool "Provide keyring for platform/firmware trusted keys"
66 bool "Provide a keyring to which Machine Owner Keys may be added"
72 If set, provide a keyring to which Machine Owner Keys (MOK) may
74 in the platform keyring, keys contained in the .machine keyring will
85 If enabled only CA keys are added to the machine keyring, all
86 other MOK keys load into the platform keyring.
94 keyring that contain the CA bit set along with the keyCertSign
97 .platform keyring.
[all …]
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()
47 kref = keyring_search(make_key_ref(keyring, 1), in request_asymmetric_key()
58 if (keyring) in request_asymmetric_key()
60 name, keyring->description, in request_asymmetric_key()
82 int asymmetric_verify(struct key *keyring, const char *sig, in asymmetric_verify() argument
102 key = request_asymmetric_key(keyring, be32_to_cpu(hdr->keyid)); in asymmetric_verify()
/linux/certs/
A DKconfig54 keys already in the keyring.
56 Keys in this keyring are used by module signature checking.
59 string "Additional X.509 keys for default system keyring"
77 system keyring without recompiling the kernel.
94 secondary trusted keyring.
101 keyring may be loaded onto the secondary trusted keyring.
103 Note: The machine keyring, if configured, will be linked to the
104 secondary keyring. When enabling this option, it is recommended
107 trusted keyring.
119 string "Hashes to be preloaded into the system blacklist keyring"
[all …]
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()
/linux/include/keys/
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/
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/Documentation/security/
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/fs/crypto/
A Dkeyring.c211 keyring = kzalloc(sizeof(*keyring), GFP_KERNEL); in allocate_filesystem_keyring()
212 if (!keyring) in allocate_filesystem_keyring()
239 if (!keyring) in fscrypt_destroy_keyring()
262 kfree_sensitive(keyring); in fscrypt_destroy_keyring()
277 return &keyring->key_hashtable[i % ARRAY_SIZE(keyring->key_hashtable)]; in fscrypt_mk_hash_bucket()
302 if (keyring == NULL) in fscrypt_find_master_key()
340 struct key *keyring; in allocate_master_key_users_keyring() local
348 if (IS_ERR(keyring)) in allocate_master_key_users_keyring()
349 return PTR_ERR(keyring); in allocate_master_key_users_keyring()
351 mk->mk_users = keyring; in allocate_master_key_users_keyring()
[all …]
/linux/fs/smb/client/
A Dcifs_spnego.c181 struct key *keyring; in init_cifs_spnego() local
196 keyring = keyring_alloc(".cifs_spnego", in init_cifs_spnego()
201 if (IS_ERR(keyring)) { in init_cifs_spnego()
202 ret = PTR_ERR(keyring); in init_cifs_spnego()
214 set_bit(KEY_FLAG_ROOT_CAN_CLEAR, &keyring->flags); in init_cifs_spnego()
215 cred->thread_keyring = keyring; in init_cifs_spnego()
219 cifs_dbg(FYI, "cifs spnego keyring: %d\n", key_serial(keyring)); in init_cifs_spnego()
223 key_put(keyring); in init_cifs_spnego()
/linux/Documentation/security/keys/
A Dcore.rst116 (+) "keyring"
141 process-specific keyring, and a session-specific keyring.
162 specific keyring and a default user session keyring. The default session
163 keyring is initialised with a link to the user-specific keyring.
406 A new keyring can be generated by setting type "keyring", the keyring name
430 a keyring.
463 as its session keyring, displacing the old session keyring.
605 * Unlink a key or keyring from another keyring::
806 keyring.
1039 keyring.
[all …]
A Drequest-key.rst96 keyring that contains a link to auth key V.
152 A search of any particular keyring proceeds in the following fashion:
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
167 keyring.
179 1) If extant, the process's thread keyring is searched.
181 2) If extant, the process's process keyring is searched.
183 3) The process's session keyring is searched.
188 a) If extant, the calling process's thread keyring is searched.
192 c) The calling process's session keyring is searched.
[all …]
/linux/security/integrity/ima/
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()
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/
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/drivers/nvme/common/
A Dkeyring.c92 static struct key *nvme_tls_psk_lookup(struct key *keyring, in nvme_tls_psk_lookup() argument
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()
113 keyref = keyring_search(make_key_ref(keyring, true), in nvme_tls_psk_lookup()
168 key_serial_t nvme_tls_psk_default(struct key *keyring, in nvme_tls_psk_default() argument
180 tls_key = nvme_tls_psk_lookup(keyring, hostnqn, subnqn, in nvme_tls_psk_default()
A DMakefile6 obj-$(CONFIG_NVME_KEYRING) += nvme-keyring.o
9 nvme-keyring-y += keyring.o
/linux/net/dns_resolver/
A Ddns_key.c338 struct key *keyring; in init_dns_resolver() local
351 keyring = keyring_alloc(".dns_resolver", in init_dns_resolver()
356 if (IS_ERR(keyring)) { in init_dns_resolver()
357 ret = PTR_ERR(keyring); in init_dns_resolver()
367 set_bit(KEY_FLAG_ROOT_CAN_CLEAR, &keyring->flags); in init_dns_resolver()
368 cred->thread_keyring = keyring; in init_dns_resolver()
372 kdebug("DNS resolver keyring: %d\n", key_serial(keyring)); in init_dns_resolver()
376 key_put(keyring); in init_dns_resolver()
/linux/include/linux/
A Dkey.h389 extern key_ref_t key_create(key_ref_t keyring,
397 extern key_ref_t key_create_or_update(key_ref_t keyring,
409 extern int key_link(struct key *keyring,
417 extern int key_unlink(struct key *keyring,
427 extern int restrict_link_reject(struct key *keyring,
432 extern int keyring_clear(struct key *keyring);
434 extern key_ref_t keyring_search(key_ref_t keyring,
439 extern int keyring_restrict(key_ref_t keyring, const char *type,
A Dkey-type.h174 struct key *keyring,
179 struct key *keyring,
185 struct key *keyring, in key_negate_and_link() argument
188 return key_reject_and_link(key, timeout, ENOKEY, keyring, authkey); in key_negate_and_link()
/linux/Documentation/crypto/
A Dasymmetric-keys.rst338 1) Restrict using the kernel builtin trusted keyring
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.
378 # Create and populate a keyring for root certificates
379 root_id=`keyctl add keyring root-certs "" @s`
383 # Create and restrict a keyring for the certificate chain
384 chain_id=`keyctl add keyring chain "" @s`
400 # Create a keyring for the certificate chain and add the root
401 chain2_id=`keyctl add keyring chain2 "" @s`
[all …]

Completed in 41 milliseconds

1234