diff options
author | Simo Sorce <simo@redhat.com> | 2015-04-04 17:10:15 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-04-04 17:10:15 -0400 |
commit | 58d3bedb1ba0b9f19045d13534de9a8df9d92df6 (patch) | |
tree | 5d2738bf2e4f975d9415cae98801a7b096f980e1 /tests | |
parent | 429fcc62a7222e56f0b741158c05d77551443f62 (diff) | |
download | gss-ntlmssp-58d3bedb1ba0b9f19045d13534de9a8df9d92df6.tar.gz gss-ntlmssp-58d3bedb1ba0b9f19045d13534de9a8df9d92df6.tar.xz gss-ntlmssp-58d3bedb1ba0b9f19045d13534de9a8df9d92df6.zip |
Add test to check actual_mech is actually returned
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ntlmssptest.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/ntlmssptest.c b/tests/ntlmssptest.c index ad90c12..82e8628 100644 --- a/tests/ntlmssptest.c +++ b/tests/ntlmssptest.c @@ -1467,6 +1467,7 @@ int test_gssapi_1(bool user_env_file, bool use_cb, bool no_seal) const char *msg = "Sample, signature checking, message."; gss_buffer_desc message = { strlen(msg), discard_const(msg) }; gss_buffer_desc ctx_token; + gss_OID actual_mech; uint8_t rand_cb[128]; struct gss_channel_bindings_struct cbts = { 0 }; gss_channel_bindings_t cbt = GSS_C_NO_CHANNEL_BINDINGS; @@ -1607,7 +1608,7 @@ int test_gssapi_1(bool user_env_file, bool use_cb, bool no_seal) retmaj = gssntlm_init_sec_context(&retmin, cli_cred, &cli_ctx, gss_srvname, GSS_C_NO_OID, req_flags, 0, cbt, - &srv_token, NULL, &cli_token, + &srv_token, &actual_mech, &cli_token, NULL, NULL); if (retmaj != GSS_S_COMPLETE) { print_gss_error("gssntlm_init_sec_context 2 failed!", @@ -1616,6 +1617,12 @@ int test_gssapi_1(bool user_env_file, bool use_cb, bool no_seal) goto done; } + if (!actual_mech) { + fprintf(stderr, "Expected actual mech to be returned!\n"); + ret = EINVAL; + goto done; + } + gss_release_buffer(&retmin, &srv_token); retmaj = gssntlm_accept_sec_context(&retmin, &srv_ctx, srv_cred, |