diff options
Diffstat (limited to 'Documentation/crypto/asymmetric-keys.txt')
-rw-r--r-- | Documentation/crypto/asymmetric-keys.txt | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Documentation/crypto/asymmetric-keys.txt b/Documentation/crypto/asymmetric-keys.txt index 2b7816dea370..5ad6480e3fb9 100644 --- a/Documentation/crypto/asymmetric-keys.txt +++ b/Documentation/crypto/asymmetric-keys.txt | |||
@@ -311,3 +311,54 @@ Functions are provided to register and unregister parsers: | |||
311 | 311 | ||
312 | Parsers may not have the same name. The names are otherwise only used for | 312 | Parsers may not have the same name. The names are otherwise only used for |
313 | displaying in debugging messages. | 313 | displaying in debugging messages. |
314 | |||
315 | |||
316 | ========================= | ||
317 | KEYRING LINK RESTRICTIONS | ||
318 | ========================= | ||
319 | |||
320 | Keyrings created from userspace using add_key can be configured to check the | ||
321 | signature of the key being linked. | ||
322 | |||
323 | Several restriction methods are available: | ||
324 | |||
325 | (1) Restrict using the kernel builtin trusted keyring | ||
326 | |||
327 | - Option string used with KEYCTL_RESTRICT_KEYRING: | ||
328 | - "builtin_trusted" | ||
329 | |||
330 | The kernel builtin trusted keyring will be searched for the signing | ||
331 | key. The ca_keys kernel parameter also affects which keys are used for | ||
332 | signature verification. | ||
333 | |||
334 | (2) Restrict using the kernel builtin and secondary trusted keyrings | ||
335 | |||
336 | - Option string used with KEYCTL_RESTRICT_KEYRING: | ||
337 | - "builtin_and_secondary_trusted" | ||
338 | |||
339 | The kernel builtin and secondary trusted keyrings will be searched for the | ||
340 | signing key. The ca_keys kernel parameter also affects which keys are used | ||
341 | for signature verification. | ||
342 | |||
343 | (3) Restrict using a separate key or keyring | ||
344 | |||
345 | - Option string used with KEYCTL_RESTRICT_KEYRING: | ||
346 | - "key_or_keyring:<key or keyring serial number>[:chain]" | ||
347 | |||
348 | Whenever a key link is requested, the link will only succeed if the key | ||
349 | being linked is signed by one of the designated keys. This key may be | ||
350 | specified directly by providing a serial number for one asymmetric key, or | ||
351 | a group of keys may be searched for the signing key by providing the | ||
352 | serial number for a keyring. | ||
353 | |||
354 | When the "chain" option is provided at the end of the string, the keys | ||
355 | within the destination keyring will also be searched for signing keys. | ||
356 | This allows for verification of certificate chains by adding each | ||
357 | cert in order (starting closest to the root) to one keyring. | ||
358 | |||
359 | In all of these cases, if the signing key is found the signature of the key to | ||
360 | be linked will be verified using the signing key. The requested key is added | ||
361 | to the keyring only if the signature is successfully verified. -ENOKEY is | ||
362 | returned if the parent certificate could not be found, or -EKEYREJECTED is | ||
363 | returned if the signature check fails or the key is blacklisted. Other errors | ||
364 | may be returned if the signature check could not be performed. | ||