mirror of https://gitee.com/openkylin/linux.git
a511e1af8b
Move the point at which a key is determined to be trustworthy to __key_link() so that we use the contents of the keyring being linked in to to determine whether the key being linked in is trusted or not. What is 'trusted' then becomes a matter of what's in the keyring. Currently, the test is done when the key is parsed, but given that at that point we can only sensibly refer to the contents of the system trusted keyring, we can only use that as the basis for working out the trustworthiness of a new key. With this change, a trusted keyring is a set of keys that once the trusted-only flag is set cannot be added to except by verification through one of the contained keys. Further, adding a key into a trusted keyring, whilst it might grant trustworthiness in the context of that keyring, does not automatically grant trustworthiness in the context of a second keyring to which it could be secondarily linked. To accomplish this, the authentication data associated with the key source must now be retained. For an X.509 cert, this means the contents of the AuthorityKeyIdentifier and the signature data. If system keyrings are disabled then restrict_link_by_builtin_trusted() resolves to restrict_link_reject(). The integrity digital signature code still works correctly with this as it was previously using KEY_FLAG_TRUSTED_ONLY, which doesn't permit anything to be added if there is no system keyring against which trust can be determined. Signed-off-by: David Howells <dhowells@redhat.com> |
||
---|---|---|
.. | ||
internal | ||
ablk_helper.h | ||
aead.h | ||
aes.h | ||
akcipher.h | ||
algapi.h | ||
authenc.h | ||
b128ops.h | ||
blowfish.h | ||
cast5.h | ||
cast6.h | ||
cast_common.h | ||
chacha20.h | ||
cryptd.h | ||
crypto_wq.h | ||
ctr.h | ||
des.h | ||
drbg.h | ||
gf128mul.h | ||
hash.h | ||
hash_info.h | ||
if_alg.h | ||
lrw.h | ||
mcryptd.h | ||
md5.h | ||
null.h | ||
padlock.h | ||
pcrypt.h | ||
pkcs7.h | ||
poly1305.h | ||
public_key.h | ||
rng.h | ||
scatterwalk.h | ||
serpent.h | ||
sha.h | ||
sha1_base.h | ||
sha256_base.h | ||
sha512_base.h | ||
skcipher.h | ||
twofish.h | ||
vmac.h | ||
xts.h |