]> git.ipfire.org Git - thirdparty/squid.git/blob - helpers/negotiate_auth/squid_kerb_auth/spnegohelp/spnegohelp.h
Merge from trunk
[thirdparty/squid.git] / helpers / negotiate_auth / squid_kerb_auth / spnegohelp / spnegohelp.h
1 /* -----------------------------------------------------------------------------
2 * spnegohelp.c declares RFC 2478 SPNEGO GSS-API mechanism APIs.
3 *
4 * Author: Frank Balluffi
5 *
6 * Copyright (C) 2002-2003. All rights reserved.
7 * -----------------------------------------------------------------------------
8 */
9
10 #ifndef SPNEGOHELP_H
11 #define SPNEGOHELP_H
12
13 #ifdef __cplusplus
14 extern "C"
15 {
16 #endif
17
18 #include <stddef.h>
19
20 /* -----------------------------------------------------------------------------
21 * makeNegTokenTarg makes an RFC 2478 SPNEGO NegTokenTarg (token) from an
22 * RFC 1964 Kerberos GSS-API token.
23 *
24 * If makeNegTokenTarg is successful, call free (*negTokenTarg) to free the
25 * memory allocated by parseNegTokenInit.
26 *
27 * Returns 0 if successful, 1 otherwise.
28 * -----------------------------------------------------------------------------
29 */
30
31 int makeNegTokenTarg (const unsigned char * kerberosToken,
32 size_t kerberosTokenLength,
33 const unsigned char ** negTokenTarg,
34 size_t * negTokenTargLength);
35
36 /* -----------------------------------------------------------------------------
37 * parseNegTokenInit parses an RFC 2478 SPNEGO NegTokenInit (token) to extract
38 * an RFC 1964 Kerberos GSS-API token.
39 *
40 * If the NegTokenInit does cotain a Kerberos GSS-API token, parseNegTokenInit
41 * returns an error.
42 *
43 * If parseNegTokenInit is successful, call free (*kerberosToken) to
44 * free the memory allocated by parseNegTokenInit.
45 *
46 * Returns 0 if successful, 1 otherwise.
47 * -----------------------------------------------------------------------------
48 */
49
50 int parseNegTokenInit (const unsigned char * negTokenInit,
51 size_t negTokenInitLength,
52 const unsigned char ** kerberosToken,
53 size_t * kerberosTokenLength);
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif /* SPNEGOHELP_H */