Whamcloud - gitweb
LU-13683 lfs: return -ENOENT when invoked on non-existing file
[fs/lustre-release.git] / contrib / scripts / crypto_patches / 0008_key_desc_prefix.patch
1 Keep 'fscrypt' as key desc prefix, for compatibility with third party tools.
2
3 --- a/libcfs/include/uapi/linux/llcrypt.h
4 +++ b/libcfs/include/uapi/linux/llcrypt.h
5 @@ -48,7 +48,7 @@ struct llcrypt_policy_v1 {
6   * Process-subscribed "logon" key description prefix and payload format.
7   * Deprecated; prefer LL_IOC_ADD_ENCRYPTION_KEY instead.
8   */
9 -#define LLCRYPT_KEY_DESC_PREFIX                "llcrypt:"
10 +#define LLCRYPT_KEY_DESC_PREFIX                "fscrypt:"
11  #define LLCRYPT_KEY_DESC_PREFIX_SIZE   8
12  #define LLCRYPT_MAX_KEY_SIZE           64
13  struct llcrypt_key {
14 --- a/libcfs/libcfs/crypto/hkdf.c
15 +++ b/libcfs/libcfs/crypto/hkdf.c
16 @@ -129,7 +129,7 @@ int llcrypt_hkdf_expand(struct llcrypt_h
17  
18         desc->tfm = hkdf->hmac_tfm;
19  
20 -       memcpy(prefix, "llcrypt\0", 8);
21 +       memcpy(prefix, "fscrypt\0", 8);
22         prefix[8] = context;
23  
24         for (i = 0; i < okmlen; i += HKDF_HASHLEN) {