root/source4/auth/gensec/spnego.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* 
   2    Unix SMB/CIFS implementation.
   3 
   4    RFC2478 Compliant SPNEGO implementation
   5 
   6    Copyright (C) Jim McDonough <jmcd@us.ibm.com>   2003
   7 
   8    This program is free software; you can redistribute it and/or modify
   9    it under the terms of the GNU General Public License as published by
  10    the Free Software Foundation; either version 3 of the License, or
  11    (at your option) any later version.
  12    
  13    This program is distributed in the hope that it will be useful,
  14    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16    GNU General Public License for more details.
  17 
  18    
  19    You should have received a copy of the GNU General Public License
  20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  21 */
  22 
  23 #define SPNEGO_DELEG_FLAG    0x01
  24 #define SPNEGO_MUTUAL_FLAG   0x02
  25 #define SPNEGO_REPLAY_FLAG   0x04
  26 #define SPNEGO_SEQUENCE_FLAG 0x08
  27 #define SPNEGO_ANON_FLAG     0x10
  28 #define SPNEGO_CONF_FLAG     0x20
  29 #define SPNEGO_INTEG_FLAG    0x40
  30 #define SPNEGO_REQ_FLAG      0x80
  31 
  32 enum spnego_negResult {
  33         SPNEGO_ACCEPT_COMPLETED = 0,
  34         SPNEGO_ACCEPT_INCOMPLETE = 1,
  35         SPNEGO_REJECT = 2,
  36         SPNEGO_NONE_RESULT = 3
  37 };
  38 
  39 struct spnego_negTokenInit {
  40         const char **mechTypes;
  41         int reqFlags;
  42         DATA_BLOB mechToken;
  43         DATA_BLOB mechListMIC;
  44         char *targetPrincipal;
  45 };
  46 
  47 struct spnego_negTokenTarg {
  48         uint8_t negResult;
  49         const char *supportedMech;
  50         DATA_BLOB responseToken;
  51         DATA_BLOB mechListMIC;
  52 };
  53 
  54 struct spnego_data {
  55         int type;
  56         struct spnego_negTokenInit negTokenInit;
  57         struct spnego_negTokenTarg negTokenTarg;
  58 };
  59 
  60 enum spnego_message_type {
  61         SPNEGO_NEG_TOKEN_INIT = 0, 
  62         SPNEGO_NEG_TOKEN_TARG = 1,
  63 };
  64 
  65 #include "auth/gensec/spnego_proto.h"

/* [<][>][^][v][top][bottom][index][help] */