00001 /* 00002 Unix SMB/CIFS implementation. 00003 00004 RFC2478 Compliant SPNEGO implementation 00005 00006 Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00022 */ 00023 00024 #ifndef SAMBA_SPNEGO_H 00025 #define SAMBA_SPNEGO_H 00026 00027 #define SPNEGO_DELEG_FLAG 0x01 00028 #define SPNEGO_MUTUAL_FLAG 0x02 00029 #define SPNEGO_REPLAY_FLAG 0x04 00030 #define SPNEGO_SEQUENCE_FLAG 0x08 00031 #define SPNEGO_ANON_FLAG 0x10 00032 #define SPNEGO_CONF_FLAG 0x20 00033 #define SPNEGO_INTEG_FLAG 0x40 00034 #define SPNEGO_REQ_FLAG 0x80 00035 00036 #define SPNEGO_NEG_TOKEN_INIT 0 00037 #define SPNEGO_NEG_TOKEN_TARG 1 00038 00039 typedef enum _spnego_negResult { 00040 SPNEGO_ACCEPT_COMPLETED = 0, 00041 SPNEGO_ACCEPT_INCOMPLETE = 1, 00042 SPNEGO_REJECT = 2 00043 } negResult_t; 00044 00045 typedef struct spnego_negTokenInit { 00046 const char **mechTypes; 00047 int reqFlags; 00048 DATA_BLOB mechToken; 00049 DATA_BLOB mechListMIC; 00050 } negTokenInit_t; 00051 00052 typedef struct spnego_negTokenTarg { 00053 uint8 negResult; 00054 char *supportedMech; 00055 DATA_BLOB responseToken; 00056 DATA_BLOB mechListMIC; 00057 } negTokenTarg_t; 00058 00059 typedef struct spnego_spnego { 00060 int type; 00061 negTokenInit_t negTokenInit; 00062 negTokenTarg_t negTokenTarg; 00063 } SPNEGO_DATA; 00064 00065 #endif
1.4.7