spnego.h revision 289ae548d52bc8f982d9823af64cafda7bd92232
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer/*
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2006 Internet Systems Consortium, Inc. ("ISC")
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer *
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
821644d49b73b49f2abc5463bc53a3132f612478Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
821644d49b73b49f2abc5463bc53a3132f612478Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
67adc03ef81fb610f8df093b17f55275ee816754Evan Hunt * PERFORMANCE OF THIS SOFTWARE.
67adc03ef81fb610f8df093b17f55275ee816754Evan Hunt */
67adc03ef81fb610f8df093b17f55275ee816754Evan Hunt
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer/* $Id: spnego.h,v 1.2 2006/12/04 01:52:46 marka Exp $ */
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt/*! \file
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt * \brief
5a77e9620a0b2f7417469c98be374de49d0eccc6Andreas Gustafsson * Entry points into portable SPNEGO implementation.
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer * See spnego.c for information on the SPNEGO implementation itself.
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer */
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#ifndef _SPNEGO_H_
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington#define _SPNEGO_H_
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt/*%
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington * Wrapper for GSSAPI gss_init_sec_context(), using portable SPNEGO
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington * implementation instead of the one that's part of the GSSAPI
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington * library. Takes arguments identical to the standard GSSAPI
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington * function, uses standard gss_init_sec_context() to handle
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington * everything inside the SPNEGO wrapper.
e2f470bebb3a0c107bc4ac86c6920c21e50e83e0Brian Wellington */
ac21f918f23ce95fd5be807428ee9e2c42319878Evan HuntOM_uint32
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrewsgss_init_sec_context_spnego(OM_uint32 *,
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews const gss_cred_id_t,
ac21f918f23ce95fd5be807428ee9e2c42319878Evan Hunt gss_ctx_id_t *,
ac21f918f23ce95fd5be807428ee9e2c42319878Evan Hunt const gss_name_t,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt const gss_OID,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt OM_uint32,
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer OM_uint32,
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer const gss_channel_bindings_t,
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer const gss_buffer_t,
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews gss_OID *,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt gss_buffer_t,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt OM_uint32 *,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt OM_uint32 *);
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt/*%
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt * Wrapper for GSSAPI gss_accept_sec_context(), using portable SPNEGO
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt * implementation instead of the one that's part of the GSSAPI
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt * library. Takes arguments identical to the standard GSSAPI
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt * function. Checks the OID of the input token to see if it's SPNEGO;
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt * if so, processes it, otherwise hands the call off to the standard
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt * gss_accept_sec_context() function.
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt */
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan HuntOM_uint32 gss_accept_sec_context_spnego(OM_uint32 *,
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt gss_ctx_id_t *,
35f6a21f5f8114542c050bfcb484b39ce513d4bdEvan Hunt const gss_cred_id_t,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt const gss_buffer_t,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt const gss_channel_bindings_t,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt gss_name_t *,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt gss_OID *,
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt gss_buffer_t,
222d38735f97f771054e223b03f84c5858252332Evan Hunt OM_uint32 *,
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer OM_uint32 *,
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer gss_cred_id_t *);
c5272fb3303425f794dab68f734f6a2a45dce01eMichael Sawyer
ac21f918f23ce95fd5be807428ee9e2c42319878Evan Hunt
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews#endif
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews