gss: add tests for importing and exporting contexts

Add the --export-import-context flag to test_context, for validating that
security contexts round-trip through GSS_Export_sec_context() and
GSS_Import_sec_context().
This commit is contained in:
Luke Howard
2020-04-14 12:33:25 +10:00
parent 9a9aaa078c
commit 846c839cbf
2 changed files with 64 additions and 6 deletions

View File

@@ -265,6 +265,29 @@ for mech in krb5 krb5iov spnego; do
done
echo "======export-import-context"
for mech in krb5 krb5iov spnego spnegoiov; do
iov=""
if [ "$mech" = "krb5iov" ] ; then
mech="krb5"
iov="--iov"
fi
if [ "$mech" = "spnegoiov" ] ; then
mech="spnego"
iov="--iov"
fi
echo "${mech}: export-import-context ${iov}" ; > messages.log
${context} \
--mech-type=${mech} \
--mutual \
--export-import-context \
--wrapunwrap ${iov} \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ eval "$testfailed"; }
done
echo "test gsskrb5_register_acceptor_identity (both positive and negative)"
cp ${keytabfile} ${keytabfile}.new