Blame SOURCES/openldap-cbinding-ITS-9189_2-add-channel-bindings-tests.patch

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