2004-06-19 08:15:41 +00:00
/*
Unix SMB / CIFS implementation .
RFC2478 Compliant SPNEGO implementation
Copyright ( C ) Jim McDonough < jmcd @ us . ibm . com > 2003
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-10 02:07:03 +00:00
the Free Software Foundation ; either version 3 of the License , or
2004-06-19 08:15:41 +00:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 02:07:03 +00:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2004-06-19 08:15:41 +00:00
*/
# define SPNEGO_DELEG_FLAG 0x01
# define SPNEGO_MUTUAL_FLAG 0x02
# define SPNEGO_REPLAY_FLAG 0x04
# define SPNEGO_SEQUENCE_FLAG 0x08
# define SPNEGO_ANON_FLAG 0x10
# define SPNEGO_CONF_FLAG 0x20
# define SPNEGO_INTEG_FLAG 0x40
# define SPNEGO_REQ_FLAG 0x80
2004-07-06 00:15:39 +00:00
enum spnego_negResult {
2004-06-19 08:15:41 +00:00
SPNEGO_ACCEPT_COMPLETED = 0 ,
SPNEGO_ACCEPT_INCOMPLETE = 1 ,
2004-07-06 17:46:47 +00:00
SPNEGO_REJECT = 2 ,
SPNEGO_NONE_RESULT = 3
2004-07-06 00:15:39 +00:00
} ;
2004-06-19 08:15:41 +00:00
struct spnego_negTokenInit {
2004-10-28 12:46:59 +00:00
const char * * mechTypes ;
2004-06-19 08:15:41 +00:00
int reqFlags ;
DATA_BLOB mechToken ;
DATA_BLOB mechListMIC ;
2004-07-11 10:20:42 +00:00
char * targetPrincipal ;
2004-06-19 08:15:41 +00:00
} ;
struct spnego_negTokenTarg {
2005-01-31 16:02:58 +00:00
uint8_t negResult ;
2004-06-19 08:15:41 +00:00
const char * supportedMech ;
DATA_BLOB responseToken ;
DATA_BLOB mechListMIC ;
} ;
struct spnego_data {
int type ;
struct spnego_negTokenInit negTokenInit ;
struct spnego_negTokenTarg negTokenTarg ;
} ;
2004-06-20 00:58:09 +00:00
enum spnego_message_type {
SPNEGO_NEG_TOKEN_INIT = 0 ,
SPNEGO_NEG_TOKEN_TARG = 1 ,
} ;
2006-11-07 00:48:36 +00:00
# include "auth/gensec/spnego_proto.h"