2 * Copyright (c) 2014 <copyright holder> <email>
4 * For license details, see the LICENSE file in the root of this project.
13 #include "GSSCommand.h"
14 #include "datamodel/GSSBuffer.h"
16 typedef OM_uint32 (*gss_wrap_type) (
17 OM_uint32 *, /* minor_status */
18 gss_ctx_id_t, /* context_handle */
19 int, /* conf_req_flag */
20 gss_qop_t, /* qop_req */
21 gss_buffer_t, /* input_message_buffer */
22 int *, /* conf_state */
23 gss_buffer_t); /* output_message_buffer */
26 class GSSWrap : GSSCommand
29 GSSWrap( gss_wrap_type fn = &gss_wrap ) : function(fn) {};
30 GSSWrap( JSONObject *params, gss_wrap_type fn = &gss_wrap);
32 virtual void execute();
33 virtual JSONObject* toJSON();
35 gss_wrap_type getGSSFunction() const { return(function); }
37 void setConfReq(int conf_req_flag) { conf_req = conf_req_flag; }
38 void setContextHandle ( gss_ctx_id_t context_handle ) { context = context_handle; }
39 void setQopReq ( int arg1 ) { qop_req = arg1; }
40 void setInputMessage ( GSSBuffer* input ) { inputMessage.setValue(input->toString()); };
42 int getConfState () const { return(conf_state); }
43 GSSBuffer getOutputMessage () const { return(outputMessage); }
44 int getConfReq() const { return(conf_req); }
45 gss_qop_t getQopReq() const { return(qop_req); }
46 GSSBuffer getInputMessage () const { return(inputMessage); }
47 gss_ctx_id_t getContext() const { return(context); }
50 gss_wrap_type function;
54 GSSBuffer inputMessage;
55 GSSBuffer outputMessage;
59 OM_uint32 minor_status;
62 bool loadParameters(JSONObject *params);