Skip to content

Commit 49525e5

Browse files
saschahauerrichardweinberger
authored andcommitted
ubifs: Add helper functions for authentication support
This patch adds the various helper functions needed for authentication support. We need functions to hash nodes, to embed HMACs into a node and to compare hashes and HMACs. Most functions first check if this filesystem is authenticated and bail out early if not, which makes the functions safe to be called with disabled authentication. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent dead972 commit 49525e5

File tree

4 files changed

+722
-0
lines changed

4 files changed

+722
-0
lines changed

fs/ubifs/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config UBIFS_FS
77
select CRYPTO if UBIFS_FS_ZLIB
88
select CRYPTO_LZO if UBIFS_FS_LZO
99
select CRYPTO_DEFLATE if UBIFS_FS_ZLIB
10+
select CRYPTO_HASH_INFO
1011
depends on MTD_UBI
1112
help
1213
UBIFS is a file system for flash devices which works on top of UBI.

fs/ubifs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ ubifs-y += recovery.o ioctl.o lpt_commit.o tnc_misc.o debug.o
88
ubifs-y += misc.o
99
ubifs-$(CONFIG_UBIFS_FS_ENCRYPTION) += crypto.o
1010
ubifs-$(CONFIG_UBIFS_FS_XATTR) += xattr.o
11+
ubifs-$(CONFIG_UBIFS_FS_AUTHENTICATION) += auth.o

0 commit comments

Comments
 (0)