gssapiP_generic.h revision 159d09a20817016f09b3ea28d1bdada4a336bb91
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 1993 by OpenVision Technologies, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of OpenVision not be used
* in advertising or publicity pertaining to distribution of the software
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _GSSAPIP_GENERIC_H_
#define _GSSAPIP_GENERIC_H_
/*
* $Id: gssapiP_generic.h 18396 2006-07-25 20:29:43Z lxs $
*/
#if defined(_WIN32)
#include "k5-int.h"
#else
#include "autoconf.h"
#ifndef _KERNEL
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif /* !_KERNEL */
#endif
#endif
#include "k5-thread.h"
#include "gssapi_generic.h"
#include "gssapi_err_generic.h"
#ifndef _KERNEL
#include <errno.h>
#else
#endif /* !_KERNEL */
#include "k5-platform.h"
typedef UINT64_TYPE gssint_uint64;
#include "gssapi/gssapi_ext.h"
/** helper macros **/
#if 0 /* SUNW15resync - on Solaris g_OID_equal is in gssapi_ext.h */
#endif
/* this code knows that an int on the wire is 32 bits. The type of
num should be at least this big, or the extra shifts may do weird
things */
(ptr) += 4;
(ptr) += 2;
(ptr) += 4;
(ptr) += 2;
/** malloc wrappers; these may actually do something later */
#ifdef _KERNEL
#else
#endif
#ifdef xfree
#endif
#ifdef _KERNEL
#else
#endif
/** helper functions **/
/* hide names from applications, especially glib applications */
#define g_set_init gssint_g_set_init
#define g_set_destroy gssint_g_set_destroy
#define g_save_name gssint_g_save_name
#define g_save_cred_id gssint_g_save_cred_id
#define g_save_ctx_id gssint_g_save_ctx_id
#define g_delete_name gssint_g_delete_name
#define g_token_size gssint_g_token_size
#define g_order_init gssint_g_order_init
#define g_order_check gssint_g_order_check
#define g_order_free gssint_g_order_free
#define g_queue_size gssint_g_queue_size
#define g_strdup gssint_g_strdup
typedef struct _g_set_elt *g_set_elt;
typedef struct {
void *data;
} g_set;
#define G_SET_INIT { K5_MUTEX_PARTIAL_INITIALIZER, 0 }
int g_set_init (g_set_elt *s);
int g_set_destroy (g_set_elt *s);
unsigned int *body_size,
unsigned int toksize_in,
int wrapper_required);
void g_order_free (void **queue);
/** declarations of internal name mechanism functions **/
#if 0 /* SUNW15resync - mved to mglueP.h for sake of non-krb5 mechs */
(OM_uint32*, /* minor_status */
gss_buffer_t /* buffer */
);
(OM_uint32*, /* minor_status */
gss_OID_set* /* set */
);
(OM_uint32*, /* minor_status */
gss_OID* /* set */
);
(OM_uint32 *, /* minor_status */
gss_OID * /* new_oid */
);
(OM_uint32 *, /* minor_status */
gss_OID_set * /* oid_set */
);
(OM_uint32 *, /* minor_status */
const gss_OID_desc * const, /* member_oid */
gss_OID_set * /* oid_set */
);
(OM_uint32 *, /* minor_status */
const gss_OID_desc * const, /* member */
gss_OID_set, /* set */
int * /* present */
);
(OM_uint32 *, /* minor_status */
const gss_OID_desc * const, /* oid */
gss_buffer_t /* oid_str */
);
(OM_uint32 *, /* minor_status */
gss_buffer_t, /* oid_str */
gss_OID * /* oid */
);
#endif /* 0 */
#endif /* _GSSAPIP_GENERIC_H_ */