cifscreds: fix up some whitespace, typos and build warnings in pam_cifscreds.c
[jlayton/cifs-utils.git] / spnego.h
1 /* 
2    Unix SMB/CIFS implementation.
3    simple kerberos5/SPNEGO routines
4    Copyright (C) Andrew Tridgell 2001
5    Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002
6    Copyright (C) Luke Howard     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    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #ifndef  _SPNEGO_H
23 #define  _SPNEGO_H
24
25 /* needed OID's */
26 #define OID_SPNEGO "1.3.6.1.5.5.2"
27 #define OID_NTLMSSP "1.3.6.1.4.1.311.2.2.10"
28 #define OID_KERBEROS5_OLD "1.2.840.48018.1.2.2"
29 #define OID_KERBEROS5 "1.2.840.113554.1.2.2"
30
31 /* not really SPNEGO but GSSAPI (RFC 1964) */
32 #define TOK_ID_KRB_AP_REQ       (unsigned char *)"\x01\x00"
33 #define TOK_ID_KRB_AP_REP       (unsigned char *)"\x02\x00"
34 #define TOK_ID_KRB_ERROR        (unsigned char *)"\x03\x00"
35 #define TOK_ID_GSS_GETMIC       (unsigned char *)"\x01\x01"
36 #define TOK_ID_GSS_WRAP         (unsigned char *)"\x02\x01"
37
38 extern DATA_BLOB gen_negTokenInit(const char *OID, DATA_BLOB blob);
39 extern DATA_BLOB spnego_gen_krb5_wrap(const DATA_BLOB ticket, const uint8_t tok_id[2]);
40
41 #endif /* _SPNEGO_H */