2 * Copyright (c) 2014 <copyright holder> <email>
4 * For license details, see the LICENSE file in the root of this project.
8 #include "InitSecContextMock.h"
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;
18 bool InitSecContextMock::visited = false;
19 bool InitSecContextMock::invalidContextHandle = false;
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;
30 void InitSecContextMock::reset()
34 nullify(claimant_cred_handle);
35 nullify(context_handle);
37 // Our current handling of OIDs means attempting to free one
38 // will often result in a double-free or an attempt to free
39 // a constant OID. For now, it is better to occasionally leak.
40 // We should revisit this -Kevin
41 mech_type = GSS_C_NO_OID;
44 nullify(input_chan_bindings);
45 input_token.length = 0;
46 input_token.value = NULL;
47 actual_mech_type = GSS_C_NO_OID;
48 output_token.length = 0;
49 output_token.value = 0;
53 invalidContextHandle = false;