xref: /illumos-gate/usr/src/lib/libsmbfs/smb/ssp.h (revision 613a2f6b)
1*613a2f6bSGordon Ross /*
2*613a2f6bSGordon Ross  * CDDL HEADER START
3*613a2f6bSGordon Ross  *
4*613a2f6bSGordon Ross  * The contents of this file are subject to the terms of the
5*613a2f6bSGordon Ross  * Common Development and Distribution License (the "License").
6*613a2f6bSGordon Ross  * You may not use this file except in compliance with the License.
7*613a2f6bSGordon Ross  *
8*613a2f6bSGordon Ross  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*613a2f6bSGordon Ross  * or http://www.opensolaris.org/os/licensing.
10*613a2f6bSGordon Ross  * See the License for the specific language governing permissions
11*613a2f6bSGordon Ross  * and limitations under the License.
12*613a2f6bSGordon Ross  *
13*613a2f6bSGordon Ross  * When distributing Covered Code, include this CDDL HEADER in each
14*613a2f6bSGordon Ross  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*613a2f6bSGordon Ross  * If applicable, add the following below this CDDL HEADER, with the
16*613a2f6bSGordon Ross  * fields enclosed by brackets "[]" replaced with your own identifying
17*613a2f6bSGordon Ross  * information: Portions Copyright [yyyy] [name of copyright owner]
18*613a2f6bSGordon Ross  *
19*613a2f6bSGordon Ross  * CDDL HEADER END
20*613a2f6bSGordon Ross  */
21*613a2f6bSGordon Ross 
22*613a2f6bSGordon Ross /*
23*613a2f6bSGordon Ross  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*613a2f6bSGordon Ross  * Use is subject to license terms.
25*613a2f6bSGordon Ross  */
26*613a2f6bSGordon Ross 
27*613a2f6bSGordon Ross #ifndef _SSP_H
28*613a2f6bSGordon Ross #define	_SSP_H
29*613a2f6bSGordon Ross 
30*613a2f6bSGordon Ross /*
31*613a2f6bSGordon Ross  * Security Support Package (SSP) interface,
32*613a2f6bSGordon Ross  * somewhat modeled on Microsoft's SSPI.
33*613a2f6bSGordon Ross  *
34*613a2f6bSGordon Ross  * XXX: Yes, should use GSS-API.  See ssp.c
35*613a2f6bSGordon Ross  */
36*613a2f6bSGordon Ross 
37*613a2f6bSGordon Ross typedef struct ssp_ctx {
38*613a2f6bSGordon Ross 	struct smb_ctx *smb_ctx;
39*613a2f6bSGordon Ross 
40*613a2f6bSGordon Ross 	SPNEGO_TOKEN_HANDLE	sp_hint;
41*613a2f6bSGordon Ross 	SPNEGO_MECH_OID		sp_mech;
42*613a2f6bSGordon Ross 
43*613a2f6bSGordon Ross 	/*
44*613a2f6bSGordon Ross 	 * Now the mechanism-specific stuff.
45*613a2f6bSGordon Ross 	 */
46*613a2f6bSGordon Ross 	int (*sp_nexttok)(struct ssp_ctx *,
47*613a2f6bSGordon Ross 	    struct mbdata *, struct mbdata *);
48*613a2f6bSGordon Ross 	void (*sp_destroy)(struct ssp_ctx *);
49*613a2f6bSGordon Ross 	void *sp_private;
50*613a2f6bSGordon Ross 
51*613a2f6bSGordon Ross } ssp_ctx_t;
52*613a2f6bSGordon Ross 
53*613a2f6bSGordon Ross int ntlmssp_init_client(ssp_ctx_t *);
54*613a2f6bSGordon Ross int krb5ssp_init_client(ssp_ctx_t *);
55*613a2f6bSGordon Ross 
56*613a2f6bSGordon Ross #endif /* _SSP_H */
57