Whamcloud - gitweb
LU-8602 libcfs: call proper crypto algo when keys are passed in 99/25199/26
authorJames Simmons <uja.ornl@yahoo.com>
Thu, 30 Nov 2017 16:06:42 +0000 (11:06 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 17 Dec 2017 06:19:16 +0000 (06:19 +0000)
commit53e967746f37d5f0322bfc984af3ce1c9517079b
treebf82ee6c8698eb931f428aa31091a3959c2ac48b
parent1a7ff02c1fbb8e85ac2e8fa458ba3fb810a76ea4
LU-8602 libcfs: call proper crypto algo when keys are passed in

In most cases keys are not passed to cfs_crypto_hash_alloc()
but if they are then crypto_ahash_setkey() will fail. Keys
are only handled by the hmac version of the algorithm requested.
If a key is passed into cfs_crypto_hash_alloc() then we should
request the hmac version of the algorithm when calling
crypto_alloc_ahash().

Change-Id: I080d89bc864b236524ef11f50df41b750ecab9fe
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25199
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/libcfs/linux/linux-crypto.c