From Fedora Project Wiki

Description

This test case verifies the basic functionality of the clevis tool, specifically binding and unbinding operations.

Setup

1. Install a fresh version of Fedora. 2. Install clevis: sudo dnf install clevis clevis-luks. 3. Create a test file: echo "Hello World" > testfile.txt.

How to test

1. Encrypt the test file with a passphrase using clevis:

  clevis encrypt pin=test passphrase="securePass" < testfile.txt > encrypted.txt. Template:FIXME
  

2. Confirm the content is encrypted:

  cat encrypted.txt. (The output should be unreadable)

3. Decrypt the content using clevis:

  clevis decrypt < encrypted.txt > decrypted.txt.

4. Confirm the decrypted content:

  cat decrypted.txt.

Expected Results

  1. The file encrypted.txt should contain unreadable encrypted data.
  2. The file decrypted.txt should contain the original "Hello World" content.

Optional

For extended testing: 1. Try binding a LUKS volume with clevis and unlocking it. 2. Use different pins for clevis operations to ensure flexibility. 3. Attempt decryption with an incorrect passphrase to verify the error handling.