test-tool: add iSCSICHAP.Base64 test

Some targets such as LIO support base64 encoded CHAP_R values. Test this
by intercepting hex-encoded CHAP_R responses and converting the value to
base64.
This will fail on targets which don't support base64; we should probably
skip the test instead.
base64 encoding is performed using the gnutls_base64_encode2() function,
so the test is only present for gnutls-enabled builds.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2026-05-21 21:43:58 +10:00
parent 16a4e050c2
commit 311548e860
5 changed files with 230 additions and 0 deletions

View File

@@ -108,6 +108,8 @@ if test "$WITH_LIBGCRYPT" != no; then
fi
WITH_LIBGCRYPT=$ac_cv_lib_gcrypt_gcry_control
fi
# gnutls_base64_encode2() was added >8 years ago so should be present
AM_CONDITIONAL(TEST_CHAP_BASE64, [test "$WITH_LIBGCRYPT"])
NEED_MD5=no
if test "$WITH_GNUTLS" = no && test "$WITH_LIBGCRYPT" = no; then