diff --git a/tests/client/torture_auth_pkcs11.c b/tests/client/torture_auth_pkcs11.c index ee97bff4..e75fea0e 100644 --- a/tests/client/torture_auth_pkcs11.c +++ b/tests/client/torture_auth_pkcs11.c @@ -196,7 +196,7 @@ static void torture_auth_autopubkey(void **state, const char *obj_name, const ch rc = ssh_options_set(session, SSH_OPTIONS_IDENTITY, priv_uri); assert_int_equal(rc, SSH_OK); - assert_string_equal(session->opts.identity->root->data, priv_uri); + assert_string_equal(session->opts.identity_non_exp->root->data, priv_uri); rc = ssh_connect(session); assert_int_equal(rc, SSH_OK); diff --git a/tests/unittests/torture_config.c b/tests/unittests/torture_config.c index 9cc20f04..d8a6197a 100644 --- a/tests/unittests/torture_config.c +++ b/tests/unittests/torture_config.c @@ -1697,7 +1697,8 @@ static void torture_config_identity(void **state) _parse_config(session, NULL, LIBSSH_TESTCONFIG_STRING13, SSH_OK); - it = ssh_list_get_iterator(session->opts.identity); + /* The identities are first added to this temporary list before expanding */ + it = ssh_list_get_iterator(session->opts.identity_non_exp); assert_non_null(it); id = it->data; /* The identities are prepended to the list so we start with second one */ diff --git a/tests/unittests/torture_options.c b/tests/unittests/torture_options.c index 10fd04d3..e08433f6 100644 --- a/tests/unittests/torture_options.c +++ b/tests/unittests/torture_options.c @@ -406,12 +406,12 @@ static void torture_options_set_identity(void **state) { rc = ssh_options_set(session, SSH_OPTIONS_ADD_IDENTITY, "identity1"); assert_true(rc == 0); - assert_string_equal(session->opts.identity->root->data, "identity1"); + assert_string_equal(session->opts.identity_non_exp->root->data, "identity1"); rc = ssh_options_set(session, SSH_OPTIONS_IDENTITY, "identity2"); assert_true(rc == 0); - assert_string_equal(session->opts.identity->root->data, "identity2"); - assert_string_equal(session->opts.identity->root->next->data, "identity1"); + assert_string_equal(session->opts.identity_non_exp->root->data, "identity2"); + assert_string_equal(session->opts.identity_non_exp->root->next->data, "identity1"); } static void torture_options_get_identity(void **state) { @@ -429,7 +429,7 @@ static void torture_options_get_identity(void **state) { rc = ssh_options_set(session, SSH_OPTIONS_IDENTITY, "identity2"); assert_int_equal(rc, SSH_OK); - assert_string_equal(session->opts.identity->root->data, "identity2"); + assert_string_equal(session->opts.identity_non_exp->root->data, "identity2"); rc = ssh_options_get(session, SSH_OPTIONS_IDENTITY, &identity); assert_int_equal(rc, SSH_OK); assert_non_null(identity); @@ -867,9 +867,9 @@ static void torture_options_copy(void **state) assert_non_null(new); /* Check the identities match */ - it = ssh_list_get_iterator(session->opts.identity); + it = ssh_list_get_iterator(session->opts.identity_non_exp); assert_non_null(it); - it2 = ssh_list_get_iterator(new->opts.identity); + it2 = ssh_list_get_iterator(new->opts.identity_non_exp); assert_non_null(it2); while (it != NULL && it2 != NULL) { assert_string_equal(it->data, it2->data); @@ -956,7 +956,7 @@ static void torture_options_getopt(void **state) "aes128-ctr"); assert_string_equal(session->opts.wanted_methods[SSH_CRYPT_S_C], "aes128-ctr"); - assert_string_equal(session->opts.identity->root->data, "id_rsa"); + assert_string_equal(session->opts.identity_non_exp->root->data, "id_rsa"); #ifdef WITH_ZLIB assert_string_equal(session->opts.wanted_methods[SSH_COMP_C_S], "zlib@openssh.com,zlib,none");