Tests: ESAPI: Add test for bound sessions

Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
diff --git a/Makefile-test.am b/Makefile-test.am
index b4f716b..a5c03ff 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -129,6 +129,7 @@
     test/integration/esys-create-primary-ecc-hmac.int \
     test/integration/esys-create-primary-hmac.int \
     test/integration/esys-create-session-auth.int \
+    test/integration/esys-create-session-auth-bound.int \
     test/integration/esys-create-session-auth-ecc.int \
     test/integration/esys-create-session-auth-xor.int \
     test/integration/esys-duplicate.int \
@@ -525,6 +526,14 @@
     test/integration/esys-create-session-auth.int.c \
     test/integration/main-esapi.c test/integration/test-esapi.h
 
+test_integration_esys_create_session_auth_bound_int_CFLAGS  = $(TESTS_CFLAGS) \
+    -DTEST_AES_ENCRYPTION -DTEST_BOUND_SESSIION
+test_integration_esys_create_session_auth_bound_int_LDADD   = $(TESTS_LDADD)
+test_integration_esys_create_session_auth_bound_int_LDFLAGS = $(TESTS_LDFLAGS) -lgcrypt
+test_integration_esys_create_session_auth_bound_int_SOURCES = \
+    test/integration/esys-create-session-auth.int.c \
+    test/integration/main-esapi.c test/integration/test-esapi.h
+
 test_integration_esys_create_session_auth_ecc_int_CFLAGS  = $(TESTS_CFLAGS) \
     -DTEST_AES_ENCRYPTION -DTEST_ECC
 test_integration_esys_create_session_auth_ecc_int_LDADD   = $(TESTS_LDADD)
diff --git a/test/integration/esys-create-session-auth.int.c b/test/integration/esys-create-session-auth.int.c
index be20300..e8cebfa 100644
--- a/test/integration/esys-create-session-auth.int.c
+++ b/test/integration/esys-create-session-auth.int.c
@@ -232,7 +232,11 @@
 
     r = Esys_StartAuthSession(esys_context,
                               primaryHandle_AuthSession,
+#if TEST_BOUND_SESSIION
+                              primaryHandle_AuthSession,
+#else
                               ESYS_TR_NONE,
+#endif
                               ESYS_TR_NONE, ESYS_TR_NONE, ESYS_TR_NONE,
                               NULL,
                               sessionType, &symmetric, authHash, &session,