472ebaff62e81dcded742ad652f7d0c1981c3fd7
[gssweb.git] / json_gssapi / test / command_mocks / InitSecContextMock.cpp
1 /*
2  * Copyright (c) 2014 <copyright holder> <email>
3  * 
4  * For license details, see the LICENSE file in the root of this project.
5  * 
6  */
7
8 #include "InitSecContextMock.h"
9 #include <stdio.h>
10
11 OM_uint32 InitSecContextMock::retVal = 0;
12 OM_uint32 InitSecContextMock::minor_status = 0;
13 OM_uint32 InitSecContextMock::req_flags = 0;
14 OM_uint32 InitSecContextMock::time_req = 0;
15 OM_uint32 InitSecContextMock::ret_flags = 0;
16 OM_uint32 InitSecContextMock::time_rec = 0;
17
18 bool InitSecContextMock::visited = false;
19 bool InitSecContextMock::invalidContextHandle = false;
20
21 gss_cred_id_t InitSecContextMock::claimant_cred_handle = NULL;
22 gss_ctx_id_t  InitSecContextMock::context_handle = NULL;
23 gss_name_t    InitSecContextMock::target_name = NULL;
24 gss_OID       InitSecContextMock::mech_type = NULL;
25 gss_channel_bindings_t InitSecContextMock::input_chan_bindings = NULL;
26 gss_buffer_desc  InitSecContextMock::input_token;
27 gss_OID       InitSecContextMock::actual_mech_type = NULL;
28 gss_buffer_desc  InitSecContextMock::output_token;
29
30 void InitSecContextMock::reset()
31 {
32   retVal = 0;
33   minor_status = 0;
34   nullify((void **)&claimant_cred_handle);
35   nullify((void **)&context_handle);
36   nullify((void **)&target_name);
37   nullify((void **)&mech_type);
38   req_flags = 0;
39   time_req = 0;
40   nullify((void **)&input_chan_bindings);
41   input_token.length = 0;
42   input_token.value = NULL;
43   nullify((void **)&actual_mech_type);
44   output_token.length = 0;
45   output_token.value = 0;
46   ret_flags = 0;
47   time_rec = 0;
48   visited = false;
49   invalidContextHandle = false;
50
51 }