scsi: target: iscsi: CHAP: add support for SHA1, SHA256 and SHA3-256
authorMaurizio Lombardi <mlombard@redhat.com>
Mon, 28 Oct 2019 12:38:20 +0000 (13:38 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 6 Nov 2019 05:11:35 +0000 (00:11 -0500)
commita572d24af4d16e70743feb0b4decb17aaae7ce43
treea0a91f8f6724047553110c4c427c9ceb42133a29
parentf6b8540f40201bff91062dd64db8e29e4ddaaa9d
scsi: target: iscsi: CHAP: add support for SHA1, SHA256 and SHA3-256

This patch modifies the chap_server_compute_hash() function to make it
agnostic to the choice of hash algorithm that is used.  It also adds
support to three new hash algorithms: SHA1, SHA256 and SHA3-256.

The chap_got_response() function has been removed because the digest type
validity is already checked by chap_server_open()

Link: https://lore.kernel.org/r/20191028123822.5864-2-mlombard@redhat.com
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Tested-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/iscsi/iscsi_target_auth.c
drivers/target/iscsi/iscsi_target_auth.h