4eb1bdf950d00637ab6817391643f85af513bc88
[gssweb.git] / json_gssapi / src / GSSCreateSecContextCommand.h
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 #ifndef GSSCREATESECCONTEXTCOMMAND_H
9 #define GSSCREATESECCONTEXTCOMMAND_H
10
11 #include "GSSCommand.h"
12 #include <gssapi.h>
13
14 class GSSCreateSecContextCommand : public GSSCommand
15 {
16 public:
17
18     OM_uint32 retVal;
19     OM_uint32 minor_status;
20     gss_ctx_id_t context_handle;
21     gss_name_t target_name;
22     gss_OID mech_type;
23     OM_uint32 req_flags;
24     OM_uint32 time_req;
25     gss_buffer_t input_token;
26     gss_OID actual_mech_type;
27     gss_buffer_t output_token;
28     OM_uint32 ret_flags;
29     OM_uint32 time_rec;
30     
31   
32     void execute();
33     GSSCreateSecContextCommand(void *fn = (void *)&gss_init_sec_context);
34     GSSCreateSecContextCommand(JSONObject *params, void *fn = (void *)&gss_init_sec_context);
35     
36     bool loadParameters(JSONObject *params);
37     bool zeroOut(bool initialized = true);
38     
39     
40     // accessors
41     OM_uint32 getReqFlags() { return req_flags; }
42     OM_uint32 getTimeReq() { return time_req; }
43     gss_ctx_id_t getContextHandle() { return context_handle; }
44     
45     // complex accessors
46     const char * getTargetDisplayName();
47     const char * getMechType();
48     
49 private:
50 };
51
52 #endif // GSSCREATESECCONTEXTCOMMAND_H