]> git.ipfire.org Git - thirdparty/squid.git/blob - helpers/negotiate_auth/squid_kerb_auth/spnegohelp/spnegohelp.h
SourceFormat: enforcement
[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 #endif
16
17 #include <stddef.h>
18
19 /* -----------------------------------------------------------------------------
20 * makeNegTokenTarg makes an RFC 2478 SPNEGO NegTokenTarg (token) from an
21 * RFC 1964 Kerberos GSS-API token.
22 *
23 * If makeNegTokenTarg is successful, call free (*negTokenTarg) to free the
24 * memory allocated by parseNegTokenInit.
25 *
26 * Returns 0 if successful, 1 otherwise.
27 * -----------------------------------------------------------------------------
28 */
29
30 int makeNegTokenTarg (const unsigned char * kerberosToken,
31 size_t kerberosTokenLength,
32 const unsigned char ** negTokenTarg,
33 size_t * negTokenTargLength);
34
35 /* -----------------------------------------------------------------------------
36 * parseNegTokenInit parses an RFC 2478 SPNEGO NegTokenInit (token) to extract
37 * an RFC 1964 Kerberos GSS-API token.
38 *
39 * If the NegTokenInit does cotain a Kerberos GSS-API token, parseNegTokenInit
40 * returns an error.
41 *
42 * If parseNegTokenInit is successful, call free (*kerberosToken) to
43 * free the memory allocated by parseNegTokenInit.
44 *
45 * Returns 0 if successful, 1 otherwise.
46 * -----------------------------------------------------------------------------
47 */
48
49 int parseNegTokenInit (const unsigned char * negTokenInit,
50 size_t negTokenInitLength,
51 const unsigned char ** kerberosToken,
52 size_t * kerberosTokenLength);
53
54 #ifdef __cplusplus
55 }
56 #endif
57
58 #endif /* SPNEGOHELP_H */