diff options
author | Simo Sorce <simo@redhat.com> | 2015-04-19 23:02:09 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-04-19 23:06:23 -0400 |
commit | 160940319094d03a5f97d91f31b1e2f4228778c8 (patch) | |
tree | c83ee4641b14cce9887f67feb0714b367b1b26c5 | |
parent | a7572e70ad98c31537c537b22afa62ec48a2a812 (diff) | |
download | gss-ntlmssp-160940319094d03a5f97d91f31b1e2f4228778c8.tar.gz gss-ntlmssp-160940319094d03a5f97d91f31b1e2f4228778c8.tar.xz gss-ntlmssp-160940319094d03a5f97d91f31b1e2f4228778c8.zip |
Add test for accept returning mech
-rw-r--r-- | tests/ntlmssptest.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/ntlmssptest.c b/tests/ntlmssptest.c index 82e8628..f15c403 100644 --- a/tests/ntlmssptest.c +++ b/tests/ntlmssptest.c @@ -1467,7 +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; + gss_OID actual_mech = GSS_C_NO_OID; uint8_t rand_cb[128]; struct gss_channel_bindings_struct cbts = { 0 }; gss_channel_bindings_t cbt = GSS_C_NO_CHANNEL_BINDINGS; @@ -1622,12 +1622,13 @@ int test_gssapi_1(bool user_env_file, bool use_cb, bool no_seal) ret = EINVAL; goto done; } + actual_mech = GSS_C_NO_OID; gss_release_buffer(&retmin, &srv_token); retmaj = gssntlm_accept_sec_context(&retmin, &srv_ctx, srv_cred, &cli_token, cbt, - NULL, NULL, &srv_token, + NULL, &actual_mech, &srv_token, NULL, NULL, NULL); if (retmaj != GSS_S_COMPLETE) { print_gss_error("gssntlm_accept_sec_context 2 failed!", @@ -1636,6 +1637,13 @@ 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; + } + actual_mech = GSS_C_NO_OID; + gss_release_buffer(&retmin, &cli_token); gss_release_buffer(&retmin, &srv_token); |