Skip to content

Commit

Permalink
ubifs: Add helper functions for authentication support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sascha Hauer authored and Richard Weinberger committed Oct 23, 2018
1 parent dead972 commit 49525e5
Show file tree
Hide file tree
Showing 4 changed files with 722 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/ubifs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config UBIFS_FS
select CRYPTO if UBIFS_FS_ZLIB
select CRYPTO_LZO if UBIFS_FS_LZO
select CRYPTO_DEFLATE if UBIFS_FS_ZLIB
select CRYPTO_HASH_INFO
depends on MTD_UBI
help
UBIFS is a file system for flash devices which works on top of UBI.
Expand Down
1 change: 1 addition & 0 deletions fs/ubifs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ ubifs-y += recovery.o ioctl.o lpt_commit.o tnc_misc.o debug.o
ubifs-y += misc.o
ubifs-$(CONFIG_UBIFS_FS_ENCRYPTION) += crypto.o
ubifs-$(CONFIG_UBIFS_FS_XATTR) += xattr.o
ubifs-$(CONFIG_UBIFS_FS_AUTHENTICATION) += auth.o
Loading

0 comments on commit 49525e5

Please sign in to comment.