summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-04-30 15:51:48 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2018-06-28 13:24:33 -0700
commitf68a71fa8f773c82ed70feb398d7b1ab8cca2dd3 (patch)
treebc6c80232bf91564e9bdefe5e111142d63695edb /crypto/algapi.c
parent52359cf4fd6dd5208b6b9613df5140dfd9a329c7 (diff)
fscrypt: separate key lookup from key derivation
Refactor the confusingly-named function 'validate_user_key()' into a new function 'find_and_derive_key()' which first finds the keyring key, then does the key derivation. Among other benefits this avoids the strange behavior we had previously where if key derivation failed for some reason, then we would fall back to the alternate key prefix. Now, we'll only fall back to the alternate key prefix if a valid key isn't found. This patch also improves the warning messages that are logged when the keyring key's payload is invalid. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'crypto/algapi.c')
0 files changed, 0 insertions, 0 deletions