Simon Pichugin 4cd1219
From 7b0017ad49a2290ec26cbcdffded8a527799e981 Mon Sep 17 00:00:00 2001
Simon Pichugin 4cd1219
From: Isaac Boukris <iboukris@gmail.com>
Simon Pichugin 4cd1219
Date: Sat, 18 Apr 2020 16:30:03 +0200
Simon Pichugin 4cd1219
Subject: [PATCH] ITS#9189 add channel-bindings tests
Simon Pichugin 4cd1219
Simon Pichugin 4cd1219
---
Simon Pichugin 4cd1219
 tests/scripts/test068-sasl-tls-external | 22 ++++++++++++++++++++++
Simon Pichugin 4cd1219
 1 file changed, 22 insertions(+)
Simon Pichugin 4cd1219
Simon Pichugin 4cd1219
diff --git a/tests/scripts/test068-sasl-tls-external b/tests/scripts/test068-sasl-tls-external
Simon Pichugin 4cd1219
index dcbc50fd4..ee112cf98 100755
Simon Pichugin 4cd1219
--- a/tests/scripts/test068-sasl-tls-external
Simon Pichugin 4cd1219
+++ b/tests/scripts/test068-sasl-tls-external
Simon Pichugin 4cd1219
@@ -88,6 +88,28 @@ else
Simon Pichugin 4cd1219
 	echo "success"
Simon Pichugin 4cd1219
 fi
Simon Pichugin 4cd1219
 
Simon Pichugin 4cd1219
+# Exercise channel-bindings code in builds without SASL support
Simon Pichugin 4cd1219
+for cb in "none" "tls-unique" "tls-endpoint" ; do
Simon Pichugin 4cd1219
+
Simon Pichugin 4cd1219
+	echo -n "Using ldapwhoami with SASL/EXTERNAL and SASL_CBINDING (${cb})...."
Simon Pichugin 4cd1219
+
Simon Pichugin 4cd1219
+	$LDAPSASLWHOAMI -o tls_cacert=$TESTDIR/tls/ca/certs/testsuiteCA.crt     \
Simon Pichugin 4cd1219
+	-o tls_cert=$TESTDIR/tls/certs/bjensen@mailgw.example.com.crt           \
Simon Pichugin 4cd1219
+	-o tls_key=$TESTDIR/tls/private/bjensen@mailgw.example.com.key          \
Simon Pichugin 4cd1219
+	-o tls_reqcert=hard -o SASL_CBINDING=$cb -ZZ -Y EXTERNAL -H $URIP1      \
Simon Pichugin 4cd1219
+	> $TESTOUT 2>&1
Simon Pichugin 4cd1219
+
Simon Pichugin 4cd1219
+	RC=$?
Simon Pichugin 4cd1219
+	if test $RC != 0 ; then
Simon Pichugin 4cd1219
+		echo "ldapwhoami failed ($RC)!"
Simon Pichugin 4cd1219
+		test $KILLSERVERS != no && kill -HUP $PID
Simon Pichugin 4cd1219
+		exit $RC
Simon Pichugin 4cd1219
+	else
Simon Pichugin 4cd1219
+		echo "success"
Simon Pichugin 4cd1219
+	fi
Simon Pichugin 4cd1219
+done
Simon Pichugin 4cd1219
+
Simon Pichugin 4cd1219
+
Simon Pichugin 4cd1219
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
Simon Pichugin 4cd1219
 
Simon Pichugin 4cd1219
 if test $RC != 0 ; then
Simon Pichugin 4cd1219
-- 
Simon Pichugin 4cd1219
2.29.2
Simon Pichugin 4cd1219