From 82726acf143a90f9caf5fa9c4bcb5e901b4a4ef1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 21 Jul 2016 15:34:50 +0200 Subject: [PATCH] testprogs/blackbox: add test_pkinit_pac_heimdal.sh This verifies that we have a PAC_CREDENTIAL_INFO element in the PAC when using pkinit. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- testprogs/blackbox/test_pkinit_pac_heimdal.sh | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 testprogs/blackbox/test_pkinit_pac_heimdal.sh diff --git a/testprogs/blackbox/test_pkinit_pac_heimdal.sh b/testprogs/blackbox/test_pkinit_pac_heimdal.sh new file mode 100755 index 00000000000..5f6947422ab --- /dev/null +++ b/testprogs/blackbox/test_pkinit_pac_heimdal.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# Blackbox tests for pkinit and pac verification +# Copyright (C) 2006-2008 Stefan Metzmacher + +if [ $# -lt 5 ]; then +cat < $PASSFILE_PATH + +USER_PRINCIPAL_NAME=`echo "${USERNAME}@${REALM}" | tr A-Z a-z` +PKUSER="--pk-user=FILE:$PREFIX/pkinit/USER-${USER_PRINCIPAL_NAME}-cert.pem,$PREFIX/pkinit/USER-${USER_PRINCIPAL_NAME}-private-key.pem" + +testit "STEP1 kinit with pkinit (name specified) " $samba4kinit $enctype --request-pac --renewable $PKUSER $USERNAME@$REALM || failed=`expr $failed + 1` +testit "STEP1 remote.pac verification" $smbtorture4 ncacn_np:$SERVER rpc.pac --workgroup=$DOMAIN -U$USERNAME%$PASSWORD --krb5-ccache=$KRB5CCNAME --option=torture:pkinit_in_use=yes || failed=`expr $failed + 1` + +rm -f $PASSFILE_PATH +rm -f $KRB5CCNAME_PATH +exit $failed -- 2.47.3