aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ubifs-utils/mkfs.ubifs/fscrypt.c5
-rw-r--r--ubifs-utils/mkfs.ubifs/fscrypt.h1
-rw-r--r--ubifs-utils/mkfs.ubifs/mkfs.ubifs.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.c b/ubifs-utils/mkfs.ubifs/fscrypt.c
index 3d4bff6..6d2b650 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.c
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.c
@@ -65,13 +65,13 @@ void free_fscrypt_context(struct fscrypt_context *fctx)
free(fctx);
}
-void print_fscrypt_master_key_descriptor(struct fscrypt_context *fctx)
+static void print_fscrypt_master_key_descriptor(__u8 *master_key_descriptor)
{
int i;
normsg_cont("fscrypt master key descriptor: 0x");
for (i = 0; i < FS_KEY_DESCRIPTOR_SIZE; i++) {
- printf("%02x", fctx->master_key_descriptor[i]);
+ printf("%02x", master_key_descriptor[i]);
}
printf("\n");
}
@@ -248,6 +248,7 @@ struct fscrypt_context *init_fscrypt_context(const char *cipher_name,
if (!key_descriptor) {
if (derive_key_descriptor(fscrypt_masterkey, master_key_descriptor))
return NULL;
+ print_fscrypt_master_key_descriptor(master_key_descriptor);
} else {
if (parse_key_descriptor(key_descriptor, master_key_descriptor))
return NULL;
diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.h b/ubifs-utils/mkfs.ubifs/fscrypt.h
index 3b717b4..34b799c 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.h
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.h
@@ -101,7 +101,6 @@ struct fscrypt_symlink_data {
unsigned char *calc_fscrypt_subkey(struct fscrypt_context *fctx);
struct fscrypt_context *inherit_fscrypt_context(struct fscrypt_context *fctx);
void free_fscrypt_context(struct fscrypt_context *fctx);
-void print_fscrypt_master_key_descriptor(struct fscrypt_context *fctx);
unsigned int fscrypt_fname_encrypted_size(struct fscrypt_context *fctx,
unsigned int ilen);
int encrypt_path(void **outbuf, void *data, unsigned int data_len,
diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
index 7073bf0..a60d392 100644
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
@@ -772,8 +772,6 @@ static int get_options(int argc, char**argv)
key_file, key_desc);
if (!root_fctx)
return -1;
-
- print_fscrypt_master_key_descriptor(root_fctx);
#else
return err_msg("mkfs.ubifs was built without crypto support.");
#endif