Project

General

Profile

Actions

Tasks #69161

closed

Tasks #63293: Implement fscrypt in libcephfs and cephfs-fuse

Create policy populator for unit tests

Added by Christopher Hoffman about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%

Reviewed:
Affected Versions:
Component(FS):
Labels (FS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

There's many occurrences of this section of code in fscrypt unit tests:

  struct fscrypt_policy_v2 policy;
  policy.version = 2;
  policy.contents_encryption_mode = FSCRYPT_MODE_AES_256_XTS;
  policy.filenames_encryption_mode = FSCRYPT_MODE_AES_256_CTS;
  policy.flags = FSCRYPT_POLICY_FLAGS_PAD_32;
  memcpy(policy.master_key_identifier, kid.raw, FSCRYPT_KEY_IDENTIFIER_SIZE);

See: https://github.com/chrisphoffman/ceph/blob/6bbdfffd971c0b2a9acdc82bfb8b4396ecc2b008/src/test/libcephfs/fscrypt.cc#L199

Create a function like: populate_policy(key, &policy) for reuse throughout tests.

Actions #1

Updated by Christopher Hoffman about 1 year ago

  • Assignee changed from Christopher Hoffman to Igor Golikov

Igor, please take this one

Actions #2

Updated by Christopher Hoffman about 1 year ago

  • Assignee changed from Igor Golikov to Christopher Hoffman
Actions #3

Updated by Christopher Hoffman about 1 year ago

  • Status changed from New to Resolved

See commit: f213988fbd8f0f21cde3ea2d6493d1f08b2ab075

Actions

Also available in: Atom PDF