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_get_mic_type) (
16 OM_uint32 *, /* minor_status */
17 gss_ctx_id_t, /* context_handle */
18 gss_qop_t, /* qop_req */
19 gss_buffer_t, /* message_buffer */
20 gss_buffer_t); /* message_token */
22 class GSSGetMic : public GSSCommand
25 GSSGetMic( gss_get_mic_type fn = &gss_get_mic ) : function(fn) {};
26 GSSGetMic( JSONObject *params, gss_get_mic_type fn = &gss_get_mic);
28 virtual void execute();
29 virtual JSONObject* toJSON();
31 gss_get_mic_type getGSSFunction() const { return(function); }
34 void setQopReq(gss_qop_t req) { this->qop_req = req; }
35 void setInputMessage ( GSSBuffer* input ) { inputMessage.setValue(input->toString()); };
36 void setContextHandle ( gss_ctx_id_t context_handle) { context = context_handle; }
39 gss_ctx_id_t getContextHandle() const { return(this->context); }
40 gss_qop_t getQopReq() const { return(this->qop_req); }
41 GSSBuffer getInputMessage() const { return(this->inputMessage); }
42 GSSBuffer getOutputToken() const { return(this->outputToken); }
46 OM_uint32 minor_status;
48 gss_get_mic_type function;
51 GSSBuffer inputMessage;
52 GSSBuffer outputToken;
54 bool loadParameters( JSONObject *params );