summaryrefslogtreecommitdiff
path: root/fs/ecryptfs/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/debug.c')
-rw-r--r--fs/ecryptfs/debug.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/fs/ecryptfs/debug.c b/fs/ecryptfs/debug.c
index 1276764f3716..0556af1adfb7 100644
--- a/fs/ecryptfs/debug.c
+++ b/fs/ecryptfs/debug.c
@@ -119,9 +119,10 @@ void ecryptfs_dump_hex(char *data, int bytes)
printk("\n");
}
-void ecryptfs_dump_salt_hex(char *data, int key_size, char *cipher)
+void ecryptfs_dump_salt_hex(char *data, int key_size,
+ const struct ecryptfs_crypt_stat *crypt_stat)
{
- size_t salt_size = ecryptfs_get_salt_size_for_cipher(cipher);
+ size_t salt_size = ecryptfs_get_salt_size_for_cipher(crypt_stat);
if (0 == salt_size)
return;
@@ -132,3 +133,18 @@ void ecryptfs_dump_salt_hex(char *data, int key_size, char *cipher)
ecryptfs_printk(KERN_DEBUG, "Decrypted session salt key:\n");
ecryptfs_dump_hex(data + key_size, salt_size);
}
+
+void ecryptfs_dump_cipher(struct ecryptfs_crypt_stat *stat)
+{
+ if (!stat)
+ return;
+
+ if (stat->cipher)
+ ecryptfs_printk(KERN_DEBUG,
+ "ecryptfs cipher is %s\n", stat->cipher);
+
+ if (stat->cipher_mode)
+ ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n",
+ stat->cipher_mode);
+
+}