2 * Copyright (c) 2014 <copyright holder> <email>
4 * For license details, see the LICENSE file in the root of this project.
11 #include "GSSCommand.h"
12 #include "datamodel/GSSBuffer.h"
13 #include <gssapi/gssapi.h>
15 typedef OM_uint32 (*gss_unwrap_type) (
16 OM_uint32 *, /* minor_status */
17 gss_ctx_id_t, /* context_handle */
18 gss_buffer_t, /* input_message_buffer */
19 gss_buffer_t, /* output_message_buffer */
20 int *, /* conf_state */
21 gss_qop_t *); /* qop_state */
24 class GSSUnwrap : GSSCommand
27 GSSUnwrap( gss_unwrap_type fn = &gss_unwrap ) : function(fn) {};
28 GSSUnwrap( JSONObject *params, gss_unwrap_type fn = &gss_unwrap);
30 gss_unwrap_type getGSSFunction() { return(function); }
31 void setContextHandle ( gss_ctx_id_t context_handle ) { context = context_handle; }
32 void setInputMessage ( GSSBuffer* input ) { inputMessage.setValue(input->toString()); };
34 gss_qop_t getQopState() const { return(qop_state); }
35 int getConfState() const { return(conf_state); }
36 GSSBuffer getInputMessage() const { return(inputMessage); }
37 GSSBuffer getOutputMessage() const { return(outputMessage); }
39 virtual void execute();
40 virtual JSONObject* toJSON();
43 gss_unwrap_type function;
45 OM_uint32 minor_status;
50 GSSBuffer inputMessage;
51 GSSBuffer outputMessage;
53 bool loadParameters(JSONObject *params);