From 46ca954f888856d6cc54e8642f1c291300505cac Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 1 May 2003 20:34:31 +0000 Subject: [PATCH] Remove GSS stuff (moved to separate project). --- Makefile.am | 7 +- README | 12 +- configure.ac | 2 +- gss/.cvsignore | 12 - gss/Makefile.am | 34 --- gss/context.c | 466 ------------------------------------- gss/cred.c | 99 -------- gss/gssapi.h | 686 ------------------------------------------------------ gss/internal.h | 45 ---- gss/misc.c | 98 -------- gss/msg.c | 61 ----- gss/name.c | 262 --------------------- gss/obsolete.c | 77 ------ gss/oid.c | 139 ----------- shishi-gss.pc.in | 21 -- tests/Makefile.am | 4 +- 16 files changed, 11 insertions(+), 2014 deletions(-) delete mode 100644 gss/.cvsignore delete mode 100644 gss/Makefile.am delete mode 100644 gss/context.c delete mode 100644 gss/cred.c delete mode 100644 gss/gssapi.h delete mode 100644 gss/internal.h delete mode 100644 gss/misc.c delete mode 100644 gss/msg.c delete mode 100644 gss/name.c delete mode 100644 gss/obsolete.c delete mode 100644 gss/oid.c delete mode 100644 shishi-gss.pc.in diff --git a/Makefile.am b/Makefile.am index 72bc0160..3dc0155e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,7 @@ DISTCHECK_CONFIGURE_FLAGS = --without-included-gettext --disable-gtk-doc -MOST_SUBDIRS = intl m4 po gss lib src tests doc extra +MOST_SUBDIRS = intl m4 po lib src tests doc extra DIST_SUBDIRS = crypto asn1 argp libstringprep $(MOST_SUBDIRS) @@ -29,13 +29,13 @@ SUBDIRS = @CRYPTO@ @ASN1@ @ARGP@ @LIBIDN@ $(MOST_SUBDIRS) ACLOCAL_AMFLAGS = -I m4 -I crypto/src pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = shishi.pc shishi-gss.pc +pkgconfig_DATA = shishi.pc sysconf_DATA = shishi.conf pkgdata_DATA = shishi.skel EXTRA_DIST = ANNOUNCE config.rpath mkinstalldirs \ - shishi.conf.in shishi.skel.in shishi.pc.in shishi-gss.pc.in + shishi.conf.in shishi.skel.in shishi.pc.in .PHONY: ChangeLog ChangeLog: @@ -45,7 +45,6 @@ ChangeLog: indent: (cd lib && make indent) - (cd gss && make indent) (cd src && make indent) (cd tests && make indent) diff --git a/README b/README index dffd9255..e1e0a31f 100644 --- a/README +++ b/README @@ -8,12 +8,12 @@ See ANNOUNCE for an overview, and doc/shishi.{info,ps,pdf} for the manual. Installation instructions are found in the INSTALL file in this directory. -The library and application (lib/, gss/, and src/) are licensed under -the GNU Public License license (see COPYING), and the documentation -(doc/) is licensed under the GNU Free Documentation License (see -COPYING.DOC). Third party packages (asn1/, crypto/, argp/, -libstringprep/, and extra/inetutils/) are distributed here for -convenience, and they have their own respective licenses. +The library and application (lib/, src/) are licensed under the GNU +Public License license (see COPYING), and the documentation (doc/) is +licensed under the GNU Free Documentation License (see COPYING.DOC). +Third party packages (asn1/, crypto/, argp/, libstringprep/, and +extra/inetutils/) are distributed here for convenience, and they have +their own respective licenses. For updates to the project, see . diff --git a/configure.ac b/configure.ac index 0e44dbd5..88e1fbb2 100644 --- a/configure.ac +++ b/configure.ac @@ -330,7 +330,7 @@ AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) AC_CONFIG_FILES(Makefile intl/Makefile po/Makefile.in m4/Makefile \ lib/Makefile lib/shishi.h src/Makefile tests/Makefile doc/Makefile \ doc/reference/Makefile extra/Makefile extra/pam_shishi/Makefile \ - shishi.pc shishi-gss.pc shishi.conf shishi.skel gss/Makefile) + shishi.pc shishi.conf shishi.skel) # We are done AC_OUTPUT diff --git a/gss/.cvsignore b/gss/.cvsignore deleted file mode 100644 index 2535432e..00000000 --- a/gss/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -libshishi-gss.la -context.lo -cred.lo -misc.lo -msg.lo -name.lo -obsolete.lo -oid.lo diff --git a/gss/Makefile.am b/gss/Makefile.am deleted file mode 100644 index acf63528..00000000 --- a/gss/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002, 2003 Simon Josefsson. -# -# This file is part of Shishi. -# -# Shishi is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# Shishi is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Shishi; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -lib_LTLIBRARIES = libshishi-gss.la -libshishi_gss_la_SOURCES = internal.h oid.c \ - cred.c context.c msg.c name.c misc.c obsolete.c -libshishi_gss_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) - -INCLUDES = -I../intl -I../lib \ - @LIBTASN1_CFLAGS@ @LIBGCRYPT_CFLAGS@ @LIBIDN_CFLAGS@ - -pkginclude_HEADERS = gssapi.h - -DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ - -indent: - indent $(SOURCES) $(pkginclude_HEADERS) diff --git a/gss/context.c b/gss/context.c deleted file mode 100644 index 8f666054..00000000 --- a/gss/context.c +++ /dev/null @@ -1,466 +0,0 @@ -/* context.c Implementation of GSS-API Context functions. - * Copyright (C) 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "internal.h" - -/** - * gss_init_sec_context: - * @minor_status: Mechanism specific status code. - * @initiator_cred_handle: Optional handle for credentials claimed. - * Supply GSS_C_NO_CREDENTIAL to act as a default initiator principal. - * If no default initiator is defined, the function will return - * GSS_S_NO_CRED. - * @context_handle: Context handle for new context. Supply - * GSS_C_NO_CONTEXT for first call; use value returned by first call - * in continuation calls. Resources associated with this - * context-handle must be released by the application after use with a - * call to gss_delete_sec_context(). - * @target_name: Name of target. - * @mech_type: Optional object ID of desired mechanism. Supply - * GSS_C_NO_OID to obtain an implementation specific default - * @req_flags: Contains various independent flags, each of which - * requests that the context support a specific service option. - * Symbolic names are provided for each flag, and the symbolic names - * corresponding to the required flags should be logically-ORed - * together to form the bit-mask value. See below for details. - * @time_req: Optional Desired number of seconds for which context - * should remain valid. Supply 0 to request a default validity - * period. - * @input_chan_bindings: Optional Application-specified bindings. - * Allows application to securely bind channel identification - * information to the security context. Specify - * GSS_C_NO_CHANNEL_BINDINGS if channel bindings are not used. - * @input_token: Optional (see text) Token received from peer - * application. Supply GSS_C_NO_BUFFER, or a pointer to a buffer - * containing the value GSS_C_EMPTY_BUFFER on initial call. - * @actual_mech_type: Optional actual mechanism used. The OID - * returned via this parameter will be a pointer to static storage - * that should be treated as read-only; In particular the application - * should not attempt to free it. Specify NULL if not required. - * @output_token: Token to be sent to peer application. If the length - * field of the returned buffer is zero, no token need be sent to the - * peer application. Storage associated with this buffer must be - * freed by the application after use with a call to - * gss_release_buffer(). - * @ret_flags: Optional various independent flags, each of which - * indicates that the context supports a specific service option. - * Specify NULL if not required. Symbolic names are provided for each - * flag, and the symbolic names corresponding to the required flags - * should be logically-ANDed with the ret_flags value to test whether - * a given option is supported by the context. See below for details. - * @time_rec: Optional number of seconds for which the context will - * remain valid. If the implementation does not support context - * expiration, the value GSS_C_INDEFINITE will be returned. Specify - * NULL if not required. - * - * Initiates the establishment of a security context between the - * application and a remote peer. Initially, the input_token - * parameter should be specified either as GSS_C_NO_BUFFER, or as a - * pointer to a gss_buffer_desc object whose length field contains the - * value zero. The routine may return a output_token which should be - * transferred to the peer application, where the peer application - * will present it to gss_accept_sec_context. If no token need be - * sent, gss_init_sec_context will indicate this by setting the length - * field of the output_token argument to zero. To complete the context - * establishment, one or more reply tokens may be required from the - * peer application; if so, gss_init_sec_context will return a status - * containing the supplementary information bit GSS_S_CONTINUE_NEEDED. - * In this case, gss_init_sec_context should be called again when the - * reply token is received from the peer application, passing the - * reply token to gss_init_sec_context via the input_token parameters. - * - * Portable applications should be constructed to use the token length - * and return status to determine whether a token needs to be sent or - * waited for. Thus a typical portable caller should always invoke - * gss_init_sec_context within a loop: - * - * int context_established = 0; - * gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT; - * ... - * input_token->length = 0; - * - * while (!context_established) { - * maj_stat = gss_init_sec_context(&min_stat, cred_hdl, &context_hdl, - * target_name, desired_mech, - * desired_services, desired_time, - * input_bindings, input_token, &actual_mech, - * output_token, &actual_services, - * &actual_time); - * if (GSS_ERROR(maj_stat)) { - * report_error(maj_stat, min_stat); - * }; - * - * if (output_token->length != 0) { - * send_token_to_peer(output_token); - * gss_release_buffer(&min_stat, output_token) - * }; - * if (GSS_ERROR(maj_stat)) { - * - * if (context_hdl != GSS_C_NO_CONTEXT) - * gss_delete_sec_context(&min_stat, &context_hdl, GSS_C_NO_BUFFER); - * break; - * }; - * - * if (maj_stat & GSS_S_CONTINUE_NEEDED) { - * receive_token_from_peer(input_token); - * } else { - * context_established = 1; - * }; - * }; - * - * Whenever the routine returns a major status that includes the value - * GSS_S_CONTINUE_NEEDED, the context is not fully established and the - * following restrictions apply to the output parameters: - * - * The value returned via the time_rec parameter is undefined Unless - * the accompanying ret_flags parameter contains the bit - * GSS_C_PROT_READY_FLAG, indicating that per-message services may be - * applied in advance of a successful completion status, the value - * returned via the actual_mech_type parameter is undefined until the - * routine returns a major status value of GSS_S_COMPLETE. - * - * The values of the GSS_C_DELEG_FLAG, GSS_C_MUTUAL_FLAG, - * GSS_C_REPLAY_FLAG, GSS_C_SEQUENCE_FLAG, GSS_C_CONF_FLAG, - * GSS_C_INTEG_FLAG and GSS_C_ANON_FLAG bits returned via the - * ret_flags parameter should contain the values that the - * implementation expects would be valid if context establishment were - * to succeed. In particular, if the application has requested a - * service such as delegation or anonymous authentication via the - * req_flags argument, and such a service is unavailable from the - * underlying mechanism, gss_init_sec_context should generate a token - * that will not provide the service, and indicate via the ret_flags - * argument that the service will not be supported. The application - * may choose to abort the context establishment by calling - * gss_delete_sec_context (if it cannot continue in the absence of the - * service), or it may choose to transmit the token and continue - * context establishment (if the service was merely desired but not - * mandatory). - * - * The values of the GSS_C_PROT_READY_FLAG and GSS_C_TRANS_FLAG bits - * within ret_flags should indicate the actual state at the time - * gss_init_sec_context returns, whether or not the context is fully - * established. - * - * GSS-API implementations that support per-message protection are - * encouraged to set the GSS_C_PROT_READY_FLAG in the final ret_flags - * returned to a caller (i.e. when accompanied by a GSS_S_COMPLETE - * status code). However, applications should not rely on this - * behavior as the flag was not defined in Version 1 of the GSS-API. - * Instead, applications should determine what per-message services - * are available after a successful context establishment according to - * the GSS_C_INTEG_FLAG and GSS_C_CONF_FLAG values. - * - * All other bits within the ret_flags argument should be set to - * zero. - * - * If the initial call of gss_init_sec_context() fails, the - * implementation should not create a context object, and should leave - * the value of the context_handle parameter set to GSS_C_NO_CONTEXT - * to indicate this. In the event of a failure on a subsequent call, - * the implementation is permitted to delete the "half-built" security - * context (in which case it should set the context_handle parameter - * to GSS_C_NO_CONTEXT), but the preferred behavior is to leave the - * security context untouched for the application to delete (using - * gss_delete_sec_context). - * - * During context establishment, the informational status bits - * GSS_S_OLD_TOKEN and GSS_S_DUPLICATE_TOKEN indicate fatal errors, - * and GSS-API mechanisms should always return them in association - * with a routine error of GSS_S_FAILURE. This requirement for - * pairing did not exist in version 1 of the GSS-API specification, so - * applications that wish to run over version 1 implementations must - * special-case these codes. - * - * The req_flags flags are: - * - * GSS_C_DELEG_FLAG - * True - Delegate credentials to remote peer - * False - Don't delegate - * - * GSS_C_MUTUAL_FLAG - * True - Request that remote peer authenticate itself - * False - Authenticate self to remote peer only - * - * GSS_C_REPLAY_FLAG - * True - Enable replay detection for messages protected with gss_wrap - * or gss_get_mic - * False - Don't attempt to detect replayed messages - * - * GSS_C_SEQUENCE_FLAG - * True - Enable detection of out-of-sequence protected messages - * False - Don't attempt to detect out-of-sequence messages - * - * GSS_C_CONF_FLAG - * True - Request that confidentiality service be made available (via gss_wrap) - * False - No per-message confidentiality service is required. - * - * GSS_C_INTEG_FLAG - * True - Request that integrity service be made available (via gss_wrap or - * gss_get_mic) - * False - No per-message integrity service is required. - * - * GSS_C_ANON_FLAG - * True - Do not reveal the initiator's identity to the acceptor. - * False - Authenticate normally. - * - * The ret_flags flags are: - * - * GSS_C_DELEG_FLAG - * True - Credentials were delegated to the remote peer - * False - No credentials were delegated - * - * GSS_C_MUTUAL_FLAG - * True - The remote peer has authenticated itself. - * False - Remote peer has not authenticated itself. - * - * GSS_C_REPLAY_FLAG - * True - replay of protected messages will be detected - * False - replayed messages will not be detected - * - * GSS_C_SEQUENCE_FLAG - * True - out-of-sequence protected messages will be detected - * False - out-of-sequence messages will not be detected - * - * GSS_C_CONF_FLAG - * True - Confidentiality service may be invoked by calling gss_wrap routine - * False - No confidentiality service (via gss_wrap) available. gss_wrap will - * provide message encapsulation, data-origin authentication and - * integrity services only. - * - * GSS_C_INTEG_FLAG - * True - Integrity service may be invoked by calling either gss_get_mic - * or gss_wrap routines. - * False - Per-message integrity service unavailable. - * - * GSS_C_ANON_FLAG - * True - The initiator's identity has not been revealed, and will not - * be revealed if any emitted token is passed to the acceptor. - * False - The initiator's identity has been or will be authenticated normally. - * - * GSS_C_PROT_READY_FLAG - * True - Protection services (as specified by the states of the - * GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available for use if the - * accompanying major status return value is either GSS_S_COMPLETE or - * GSS_S_CONTINUE_NEEDED. - * False - Protection services (as specified by the states of the - * GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available only if the - * accompanying major status return value is GSS_S_COMPLETE. - * - * GSS_C_TRANS_FLAG - * True - The resultant security context may be transferred to other - * processes via a call to gss_export_sec_context(). - * False - The security context is not transferable. - * - * All other bits should be set to zero. - * - * Return value: Returns: - * - * GSS_S_COMPLETE Successful completion - * - * GSS_S_CONTINUE_NEEDED Indicates that a token from the peer - * application is required to complete the - * context, and that gss_init_sec_context - * must be called again with that token. - * - * GSS_S_DEFECTIVE_TOKEN Indicates that consistency checks performed - * on the input_token failed - * - * GSS_S_DEFECTIVE_CREDENTIAL Indicates that consistency checks - * performed on the credential failed. - * - * GSS_S_NO_CRED The supplied credentials were not valid for - * context initiation, or the credential handle - * did not reference any credentials. - * - * GSS_S_CREDENTIALS_EXPIRED The referenced credentials have expired - * - * GSS_S_BAD_BINDINGS The input_token contains different channel - * bindings to those specified via the - * input_chan_bindings parameter - * - * GSS_S_BAD_SIG The input_token contains an invalid MIC, or a MIC - * that could not be verified - * - * GSS_S_OLD_TOKEN The input_token was too old. This is a fatal - * error during context establishment - * - * GSS_S_DUPLICATE_TOKEN The input_token is valid, but is a duplicate - * of a token already processed. This is a - * fatal error during context establishment. - * - * GSS_S_NO_CONTEXT Indicates that the supplied context handle did - * not refer to a valid context - * - * GSS_S_BAD_NAMETYPE The provided target_name parameter contained an - * invalid or unsupported type of name - * - * GSS_S_BAD_NAME The provided target_name parameter was ill-formed. - * - * GSS_S_BAD_MECH The specified mechanism is not supported by the - * provided credential, or is unrecognized by the - * implementation. - * - **/ -OM_uint32 -gss_init_sec_context (OM_uint32 * minor_status, - const gss_cred_id_t initiator_cred_handle, - gss_ctx_id_t * context_handle, - const gss_name_t target_name, - const gss_OID mech_type, - OM_uint32 req_flags, - OM_uint32 time_req, - const gss_channel_bindings_t input_chan_bindings, - const gss_buffer_t input_token, - gss_OID * actual_mech_type, - gss_buffer_t output_token, - OM_uint32 * ret_flags, OM_uint32 * time_rec) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_accept_sec_context (OM_uint32 * minor_status, - gss_ctx_id_t * context_handle, - const gss_cred_id_t acceptor_cred_handle, - const gss_buffer_t input_token_buffer, - const gss_channel_bindings_t input_chan_bindings, - gss_name_t * src_name, - gss_OID * mech_type, - gss_buffer_t output_token, - OM_uint32 * ret_flags, - OM_uint32 * time_rec, - gss_cred_id_t * delegated_cred_handle) -{ - return GSS_S_FAILURE; -} - -/** - * gss_delete_sec_context: - * @minor_status: Mechanism specific status code. - * @context_handle: Context handle identifying context to delete. - * After deleting the context, the GSS-API will set this context - * handle to GSS_C_NO_CONTEXT. - * @output_token: Optional token to be sent to remote application to - * instruct it to also delete the context. It is recommended that - * applications specify GSS_C_NO_BUFFER for this parameter, requesting - * local deletion only. If a buffer parameter is provided by the - * application, the mechanism may return a token in it; mechanisms - * that implement only local deletion should set the length field of - * this token to zero to indicate to the application that no token is - * to be sent to the peer. - * - * Delete a security context. gss_delete_sec_context() will delete - * the local data structures associated with the specified security - * context, and may generate an output_token, which when passed to the - * peer gss_process_context_token() will instruct it to do likewise. - * If no token is required by the mechanism, the GSS-API should set - * the length field of the output_token (if provided) to zero. No - * further security services may be obtained using the context - * specified by context_handle. - * - * In addition to deleting established security contexts, - * gss_delete_sec_context() must also be able to delete "half-built" - * security contexts resulting from an incomplete sequence of - * gss_init_sec_context()/gss_accept_sec_context() calls. - * - * The output_token parameter is retained for compatibility with - * version 1 of the GSS-API. It is recommended that both peer - * applications invoke gss_delete_sec_context() passing the value - * GSS_C_NO_BUFFER for the output_token parameter, indicating that no - * token is required, and that gss_delete_sec_context() should simply - * delete local context data structures. If the application does pass - * a valid buffer to gss_delete_sec_context(), mechanisms are - * encouraged to return a zero-length token, indicating that no peer - * action is necessary, and that no token should be transferred by the - * application. - * - * Return value: Returns GSS_S_COMPLETE for successful completion, and - * GSS_S_NO_CONTEXT if no valid context was supplied. - **/ -OM_uint32 -gss_delete_sec_context (OM_uint32 * minor_status, - gss_ctx_id_t * context_handle, - gss_buffer_t output_token) -{ - if (!context_handle || *context_handle == GSS_C_NO_CONTEXT) - return GSS_S_NO_CONTEXT; - - if (output_token != GSS_C_NO_BUFFER) - output_token->length = 0; - - free (*context_handle); - *context_handle = GSS_C_NO_CONTEXT; - - return GSS_S_COMPLETE; -} - -OM_uint32 -gss_process_context_token (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, - const gss_buffer_t token_buffer) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_context_time (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, OM_uint32 * time_rec) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_inquire_context (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, - gss_name_t * src_name, - gss_name_t * targ_name, - OM_uint32 * lifetime_rec, - gss_OID * mech_type, - OM_uint32 * ctx_flags, int *locally_initiated, int *open) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_wrap_size_limit (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, - int conf_req_flag, - gss_qop_t qop_req, - OM_uint32 req_output_size, OM_uint32 * max_input_size) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_export_sec_context (OM_uint32 * minor_status, - gss_ctx_id_t * context_handle, - gss_buffer_t interprocess_token) -{ - return GSS_S_UNAVAILABLE; -} - -OM_uint32 -gss_import_sec_context (OM_uint32 * minor_status, - const gss_buffer_t interprocess_token, - gss_ctx_id_t * context_handle) -{ - return GSS_S_UNAVAILABLE; -} diff --git a/gss/cred.c b/gss/cred.c deleted file mode 100644 index 84e502f6..00000000 --- a/gss/cred.c +++ /dev/null @@ -1,99 +0,0 @@ -/* cred.c Implementation of GSS-API Credential Management functions. - * Copyright (C) 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "internal.h" - -OM_uint32 -gss_acquire_cred (OM_uint32 * minor_status, - const gss_name_t desired_name, - OM_uint32 time_req, - const gss_OID_set desired_mechs, - gss_cred_usage_t cred_usage, - gss_cred_id_t * output_cred_handle, - gss_OID_set * actual_mechs, OM_uint32 * time_rec) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_add_cred (OM_uint32 * minor_status, - const gss_cred_id_t input_cred_handle, - const gss_name_t desired_name, - const gss_OID desired_mech, - gss_cred_usage_t cred_usage, - OM_uint32 initiator_time_req, - OM_uint32 acceptor_time_req, - gss_cred_id_t * output_cred_handle, - gss_OID_set * actual_mechs, - OM_uint32 * initiator_time_rec, OM_uint32 * acceptor_time_rec) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_inquire_cred (OM_uint32 * minor_status, - const gss_cred_id_t cred_handle, - gss_name_t * name, - OM_uint32 * lifetime, - gss_cred_usage_t * cred_usage, gss_OID_set * mechanisms) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_inquire_cred_by_mech (OM_uint32 * minor_status, - const gss_cred_id_t cred_handle, - const gss_OID mech_type, - gss_name_t * name, - OM_uint32 * initiator_lifetime, - OM_uint32 * acceptor_lifetime, - gss_cred_usage_t * cred_usage) -{ - return GSS_S_FAILURE; -} - -/** - * gss_release_cred: - * @minor_status: Mechanism specific status code. - * @cred_handle: Optional opaque handle identifying credential to be - * released. If GSS_C_NO_CREDENTIAL is supplied, the routine will - * complete successfully, but will do nothing. - * - * Informs GSS-API that the specified credential handle is no longer - * required by the application, and frees associated resources. - * Implementations are encouraged to set the cred_handle to - * GSS_C_NO_CREDENTIAL on successful completion of this call. - * - * Return value: Returns GSS_S_COMPLETE for successful completion, and - * GSS_S_NO_CRED for credentials could not be accessed. - **/ -OM_uint32 -gss_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle) -{ - if (cred_handle && *cred_handle) - free (*cred_handle); - - *cred_handle = GSS_C_NO_CREDENTIAL; - - if (minor_status) - minor_status = 0; - return GSS_S_COMPLETE; -} diff --git a/gss/gssapi.h b/gss/gssapi.h deleted file mode 100644 index b651e031..00000000 --- a/gss/gssapi.h +++ /dev/null @@ -1,686 +0,0 @@ -/* gssapi.h Header file for GSS-API. - * Copyright (C) 2003 Simon Josefsson - * Copyright (C) The Internet Society (2000). All Rights Reserved. - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -/* - * This file was extracted by Simon Josefsson, for the Shishi project, - * from RFC 2744, written by John Wray. RFC 2744 contain the - * copyright statement below. A description of all modifications, - * compared to RFC 2744, made to this file can be found in the file - * ChangeLog, which is part of Shishi. - * - * Copyright (C) The Internet Society (2000). All Rights Reserved. - * - * This document and translations of it may be copied and furnished to - * others, and derivative works that comment on or otherwise explain it - * or assist in its implementation may be prepared, copied, published - * and distributed, in whole or in part, without restriction of any - * kind, provided that the above copyright notice and this paragraph are - * included on all such copies and derivative works. However, this - * document itself may not be modified in any way, such as by removing - * the copyright notice or references to the Internet Society or other - * Internet organizations, except as needed for the purpose of - * developing Internet standards in which case the procedures for - * copyrights defined in the Internet Standards process must be - * followed, or as required to translate it into languages other than - * English. - * - * The limited permissions granted above are perpetual and will not be - * revoked by the Internet Society or its successors or assigns. - * - * This document and the information contained herein is provided on an - * "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - * TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - * BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - * HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef GSSAPI_H_ -#define GSSAPI_H_ - - - -/* - * First, include stddef.h to get size_t defined. - */ -#include - - -/* - * Now define the three implementation-dependent types. - */ -typedef struct gss_ctx_id_t *gss_ctx_id_t; -typedef struct gss_cred_id_t *gss_cred_id_t; -typedef struct gss_name_t *gss_name_t; - -/* - * The following type must be defined as the smallest natural - * unsigned integer supported by the platform that has at least - * 32 bits of precision. - */ -#include -#if USHRT_MAX >= 4294967295 -typedef unsigned short gss_uint32; -#elif UINT_MAX >= 4294967295 -typedef unsigned int gss_uint32; -#else /* unsigned long's must be at least 32 bits according to K&R */ -typedef unsigned long gss_uint32; -#endif - -/* - * We can't use X/Open definitions, so roll our own. - */ - -typedef gss_uint32 OM_uint32; - -typedef struct gss_OID_desc_struct -{ - OM_uint32 length; - void *elements; -} gss_OID_desc, *gss_OID; - - -typedef struct gss_OID_set_desc_struct -{ - size_t count; - gss_OID elements; -} gss_OID_set_desc, *gss_OID_set; - -typedef struct gss_buffer_desc_struct -{ - size_t length; - void *value; -} gss_buffer_desc, *gss_buffer_t; - -typedef struct gss_channel_bindings_struct -{ - OM_uint32 initiator_addrtype; - gss_buffer_desc initiator_address; - OM_uint32 acceptor_addrtype; - gss_buffer_desc acceptor_address; - gss_buffer_desc application_data; -} *gss_channel_bindings_t; - -/* - * For now, define a QOP-type as an OM_uint32 - */ -typedef OM_uint32 gss_qop_t; - -typedef int gss_cred_usage_t; - -/* - * Flag bits for context-level services. - */ - - - - - -#define GSS_C_DELEG_FLAG 1 -#define GSS_C_MUTUAL_FLAG 2 -#define GSS_C_REPLAY_FLAG 4 -#define GSS_C_SEQUENCE_FLAG 8 -#define GSS_C_CONF_FLAG 16 -#define GSS_C_INTEG_FLAG 32 -#define GSS_C_ANON_FLAG 64 -#define GSS_C_PROT_READY_FLAG 128 -#define GSS_C_TRANS_FLAG 256 - -/* - * Credential usage options - */ -#define GSS_C_BOTH 0 -#define GSS_C_INITIATE 1 -#define GSS_C_ACCEPT 2 - -/* - * Status code types for gss_display_status - */ -#define GSS_C_GSS_CODE 1 -#define GSS_C_MECH_CODE 2 - -/* - * The constant definitions for channel-bindings address families - */ -#define GSS_C_AF_UNSPEC 0 -#define GSS_C_AF_LOCAL 1 -#define GSS_C_AF_INET 2 -#define GSS_C_AF_IMPLINK 3 -#define GSS_C_AF_PUP 4 -#define GSS_C_AF_CHAOS 5 -#define GSS_C_AF_NS 6 -#define GSS_C_AF_NBS 7 -#define GSS_C_AF_ECMA 8 -#define GSS_C_AF_DATAKIT 9 -#define GSS_C_AF_CCITT 10 -#define GSS_C_AF_SNA 11 -#define GSS_C_AF_DECnet 12 -#define GSS_C_AF_DLI 13 -#define GSS_C_AF_LAT 14 -#define GSS_C_AF_HYLINK 15 -#define GSS_C_AF_APPLETALK 16 -#define GSS_C_AF_BSC 17 -#define GSS_C_AF_DSS 18 -#define GSS_C_AF_OSI 19 -#define GSS_C_AF_X25 21 - -#define GSS_C_AF_NULLADDR 255 - -/* - * Various Null values - */ -#define GSS_C_NO_NAME ((gss_name_t) 0) -#define GSS_C_NO_BUFFER ((gss_buffer_t) 0) -#define GSS_C_NO_OID ((gss_OID) 0) -#define GSS_C_NO_OID_SET ((gss_OID_set) 0) -#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0) -#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0) -#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0) -#define GSS_C_EMPTY_BUFFER {0, NULL} - -/* - * Some alternate names for a couple of the above - * values. These are defined for V1 compatibility. - */ -#define GSS_C_NULL_OID GSS_C_NO_OID -#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET - -/* - * Define the default Quality of Protection for per-message - * services. Note that an implementation that offers multiple - * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero - * (as done here) to mean "default protection", or to a specific - * explicit QOP value. However, a value of 0 should always be - * interpreted by a GSS-API implementation as a request for the - * default protection level. - */ -#define GSS_C_QOP_DEFAULT 0 - -/* - * Expiration time of 2^32-1 seconds means infinite lifetime for a - * credential or security context - */ -#define GSS_C_INDEFINITE 0xfffffffful - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x01"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant - * GSS_C_NT_USER_NAME should be initialized to point - * to that gss_OID_desc. - */ -extern gss_OID GSS_C_NT_USER_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x02"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. - * The constant GSS_C_NT_MACHINE_UID_NAME should be - * initialized to point to that gss_OID_desc. - */ -extern gss_OID GSS_C_NT_MACHINE_UID_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x03"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. - * The constant GSS_C_NT_STRING_UID_NAME should be - * initialized to point to that gss_OID_desc. - */ -extern gss_OID GSS_C_NT_STRING_UID_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, - * corresponding to an object-identifier value of - * {iso(1) org(3) dod(6) internet(1) security(5) - * nametypes(6) gss-host-based-services(2)). The constant - * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point - * to that gss_OID_desc. This is a deprecated OID value, and - * implementations wishing to support hostbased-service names - * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, - * defined below, to identify such names; - * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym - * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input - * parameter, but should not be emitted by GSS-API - * implementations - */ -extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x04"}, corresponding to an - * object-identifier value of {iso(1) member-body(2) - * Unites States(840) mit(113554) infosys(1) gssapi(2) - * generic(1) service_name(4)}. The constant - * GSS_C_NT_HOSTBASED_SERVICE should be initialized - * to point to that gss_OID_desc. - */ -extern gss_OID GSS_C_NT_HOSTBASED_SERVICE; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, - * corresponding to an object identifier value of - * {1(iso), 3(org), 6(dod), 1(internet), 5(security), - * 6(nametypes), 3(gss-anonymous-name)}. The constant - * and GSS_C_NT_ANONYMOUS should be initialized to point - * to that gss_OID_desc. - */ -extern gss_OID GSS_C_NT_ANONYMOUS; - - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, - * corresponding to an object-identifier value of - * {1(iso), 3(org), 6(dod), 1(internet), 5(security), - * 6(nametypes), 4(gss-api-exported-name)}. The constant - * GSS_C_NT_EXPORT_NAME should be initialized to point - * to that gss_OID_desc. - */ -extern gss_OID GSS_C_NT_EXPORT_NAME; - - -/* Major status codes */ - -#define GSS_S_COMPLETE 0 - -/* - * Some "helper" definitions to make the status code macros obvious. - */ -#define GSS_C_CALLING_ERROR_OFFSET 24 -#define GSS_C_ROUTINE_ERROR_OFFSET 16 -#define GSS_C_SUPPLEMENTARY_OFFSET 0 -#define GSS_C_CALLING_ERROR_MASK 0377ul -#define GSS_C_ROUTINE_ERROR_MASK 0377ul -#define GSS_C_SUPPLEMENTARY_MASK 0177777ul - -/* - * The macros that test status codes for error conditions. - * Note that the GSS_ERROR() macro has changed slightly from - * the V1 GSS-API so that it now evaluates its argument - * only once. - */ -#define GSS_CALLING_ERROR(x) \ - (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET)) -#define GSS_ROUTINE_ERROR(x) \ - (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)) -#define GSS_SUPPLEMENTARY_INFO(x) \ - (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET)) -#define GSS_ERROR(x) \ - (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \ - (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))) - -/* - * Now the actual status code definitions - */ - -/* - * Calling errors: - - */ -#define GSS_S_CALL_INACCESSIBLE_READ \ -(1ul << GSS_C_CALLING_ERROR_OFFSET) -#define GSS_S_CALL_INACCESSIBLE_WRITE \ -(2ul << GSS_C_CALLING_ERROR_OFFSET) -#define GSS_S_CALL_BAD_STRUCTURE \ -(3ul << GSS_C_CALLING_ERROR_OFFSET) - -/* - * Routine errors: - */ -#define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_MIC GSS_S_BAD_SIG -#define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET) - -/* - * Supplementary info bits: - */ -#define GSS_S_CONTINUE_NEEDED \ - (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0)) -#define GSS_S_DUPLICATE_TOKEN \ - (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1)) -#define GSS_S_OLD_TOKEN \ - (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2)) -#define GSS_S_UNSEQ_TOKEN \ - (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3)) -#define GSS_S_GAP_TOKEN \ - (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4)) - -/* - * Finally, function prototypes for the GSS-API routines. - */ - - -OM_uint32 gss_acquire_cred (OM_uint32 *, /* minor_status */ - const gss_name_t, /* desired_name */ - OM_uint32, /* time_req */ - const gss_OID_set, /* desired_mechs */ - gss_cred_usage_t, /* cred_usage */ - gss_cred_id_t *, /* output_cred_handle */ - gss_OID_set *, /* actual_mechs */ - OM_uint32 * /* time_rec */ - ); - -OM_uint32 gss_release_cred (OM_uint32 *, /* minor_status */ - gss_cred_id_t * /* cred_handle */ - ); - -OM_uint32 gss_init_sec_context (OM_uint32 *, /* minor_status */ - const gss_cred_id_t, /* initiator_cred_handle */ - gss_ctx_id_t *, /* context_handle */ - const gss_name_t, /* target_name */ - const gss_OID, /* mech_type */ - OM_uint32, /* req_flags */ - OM_uint32, /* time_req */ - const gss_channel_bindings_t, - /* input_chan_bindings */ - const gss_buffer_t, /* input_token */ - gss_OID *, /* actual_mech_type */ - gss_buffer_t, /* output_token */ - OM_uint32 *, /* ret_flags */ - OM_uint32 * /* time_rec */ - ); - -OM_uint32 gss_accept_sec_context (OM_uint32 *, /* minor_status */ - gss_ctx_id_t *, /* context_handle */ - const gss_cred_id_t, /* acceptor_cred_handle */ - const gss_buffer_t, /* input_token_buffer */ - const gss_channel_bindings_t, - /* input_chan_bindings */ - gss_name_t *, /* src_name */ - gss_OID *, /* mech_type */ - gss_buffer_t, /* output_token */ - OM_uint32 *, /* ret_flags */ - OM_uint32 *, /* time_rec */ - gss_cred_id_t * /* delegated_cred_handle */ - ); - -OM_uint32 gss_process_context_token (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - const gss_buffer_t /* token_buffer */ - ); - -OM_uint32 gss_delete_sec_context (OM_uint32 *, /* minor_status */ - gss_ctx_id_t *, /* context_handle */ - gss_buffer_t /* output_token */ - ); - -OM_uint32 gss_context_time (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - OM_uint32 * /* time_rec */ - ); - -OM_uint32 gss_get_mic (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - gss_qop_t, /* qop_req */ - const gss_buffer_t, /* message_buffer */ - gss_buffer_t /* message_token */ - ); - -OM_uint32 gss_verify_mic (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - const gss_buffer_t, /* message_buffer */ - const gss_buffer_t, /* token_buffer */ - gss_qop_t * /* qop_state */ - ); - -OM_uint32 gss_wrap (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - int, /* conf_req_flag */ - gss_qop_t, /* qop_req */ - const gss_buffer_t, /* input_message_buffer */ - int *, /* conf_state */ - gss_buffer_t /* output_message_buffer */ - ); - -OM_uint32 gss_unwrap (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - const gss_buffer_t, /* input_message_buffer */ - gss_buffer_t, /* output_message_buffer */ - int *, /* conf_state */ - gss_qop_t * /* qop_state */ - ); - -OM_uint32 gss_display_status (OM_uint32 *, /* minor_status */ - OM_uint32, /* status_value */ - int, /* status_type */ - const gss_OID, /* mech_type */ - OM_uint32 *, /* message_context */ - gss_buffer_t /* status_string */ - ); - -OM_uint32 gss_indicate_mechs (OM_uint32 *, /* minor_status */ - gss_OID_set * /* mech_set */ - ); - -OM_uint32 gss_compare_name (OM_uint32 *, /* minor_status */ - const gss_name_t, /* name1 */ - const gss_name_t, /* name2 */ - int * /* name_equal */ - ); - -OM_uint32 gss_display_name (OM_uint32 *, /* minor_status */ - const gss_name_t, /* input_name */ - gss_buffer_t, /* output_name_buffer */ - gss_OID * /* output_name_type */ - ); - -OM_uint32 gss_import_name (OM_uint32 *, /* minor_status */ - const gss_buffer_t, /* input_name_buffer */ - const gss_OID, /* input_name_type */ - gss_name_t * /* output_name */ - ); - -OM_uint32 gss_export_name (OM_uint32 *, /* minor_status */ - const gss_name_t, /* input_name */ - gss_buffer_t /* exported_name */ - ); - -OM_uint32 gss_release_name (OM_uint32 *, /* minor_status */ - gss_name_t * /* name */ - ); - -OM_uint32 gss_release_buffer (OM_uint32 *, /* minor_status */ - gss_buffer_t /* buffer */ - ); - -OM_uint32 gss_release_oid_set (OM_uint32 *, /* minor_status */ - gss_OID_set * /* set */ - ); - -OM_uint32 gss_inquire_cred (OM_uint32 *, /* minor_status */ - const gss_cred_id_t, /* cred_handle */ - gss_name_t *, /* name */ - OM_uint32 *, /* lifetime */ - gss_cred_usage_t *, /* cred_usage */ - gss_OID_set * /* mechanisms */ - ); - -OM_uint32 gss_inquire_context (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - gss_name_t *, /* src_name */ - gss_name_t *, /* targ_name */ - OM_uint32 *, /* lifetime_rec */ - gss_OID *, /* mech_type */ - OM_uint32 *, /* ctx_flags */ - int *, /* locally_initiated */ - int * /* open */ - ); - -OM_uint32 gss_wrap_size_limit (OM_uint32 *, /* minor_status */ - const gss_ctx_id_t, /* context_handle */ - int, /* conf_req_flag */ - gss_qop_t, /* qop_req */ - OM_uint32, /* req_output_size */ - OM_uint32 * /* max_input_size */ - ); - -OM_uint32 gss_add_cred (OM_uint32 *, /* minor_status */ - const gss_cred_id_t, /* input_cred_handle */ - const gss_name_t, /* desired_name */ - const gss_OID, /* desired_mech */ - gss_cred_usage_t, /* cred_usage */ - OM_uint32, /* initiator_time_req */ - OM_uint32, /* acceptor_time_req */ - gss_cred_id_t *, /* output_cred_handle */ - gss_OID_set *, /* actual_mechs */ - OM_uint32 *, /* initiator_time_rec */ - OM_uint32 * /* acceptor_time_rec */ - ); - -OM_uint32 gss_inquire_cred_by_mech (OM_uint32 *, /* minor_status */ - const gss_cred_id_t, /* cred_handle */ - const gss_OID, /* mech_type */ - gss_name_t *, /* name */ - OM_uint32 *, /* initiator_lifetime */ - OM_uint32 *, /* acceptor_lifetime */ - gss_cred_usage_t * /* cred_usage */ - ); - -OM_uint32 gss_export_sec_context (OM_uint32 *, /* minor_status */ - gss_ctx_id_t *, /* context_handle */ - gss_buffer_t /* interprocess_token */ - ); - -OM_uint32 gss_import_sec_context (OM_uint32 *, /* minor_status */ - const gss_buffer_t, /* interprocess_token */ - gss_ctx_id_t * /* context_handle */ - ); - -OM_uint32 gss_create_empty_oid_set (OM_uint32 *, /* minor_status */ - gss_OID_set * /* oid_set */ - ); - -OM_uint32 gss_add_oid_set_member (OM_uint32 *, /* minor_status */ - const gss_OID, /* member_oid */ - gss_OID_set * /* oid_set */ - ); - -OM_uint32 gss_test_oid_set_member (OM_uint32 *, /* minor_status */ - const gss_OID, /* member */ - const gss_OID_set, /* set */ - int * /* present */ - ); - -OM_uint32 gss_inquire_names_for_mech (OM_uint32 *, /* minor_status */ - const gss_OID, /* mechanism */ - gss_OID_set * /* name_types */ - ); - -OM_uint32 gss_inquire_mechs_for_name (OM_uint32 *, /* minor_status */ - const gss_name_t, /* input_name */ - gss_OID_set * /* mech_types */ - ); - -OM_uint32 gss_canonicalize_name (OM_uint32 *, /* minor_status */ - const gss_name_t, /* input_name */ - const gss_OID, /* mech_type */ - gss_name_t * /* output_name */ - ); - -OM_uint32 gss_duplicate_name (OM_uint32 *, /* minor_status */ - const gss_name_t, /* src_name */ - gss_name_t * /* dest_name */ - ); - -/* - * The following routines are obsolete variants of gss_get_mic, - * gss_verify_mic, gss_wrap and gss_unwrap. They should be - * provided by GSS-API V2 implementations for backwards - * compatibility with V1 applications. Distinct entrypoints - * (as opposed to #defines) should be provided, both to allow - * GSS-API V1 applications to link against GSS-API V2 - implementations, - * and to retain the slight parameter type differences between the - * obsolete versions of these routines and their current forms. - */ - -OM_uint32 gss_sign (OM_uint32 *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - int, /* qop_req */ - gss_buffer_t, /* message_buffer */ - gss_buffer_t /* message_token */ - ); - - -OM_uint32 gss_verify (OM_uint32 *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_buffer_t, /* message_buffer */ - gss_buffer_t, /* token_buffer */ - int * /* qop_state */ - ); - -OM_uint32 gss_seal (OM_uint32 *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - int, /* conf_req_flag */ - int, /* qop_req */ - gss_buffer_t, /* input_message_buffer */ - int *, /* conf_state */ - gss_buffer_t /* output_message_buffer */ - ); - - -OM_uint32 gss_unseal (OM_uint32 *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_buffer_t, /* input_message_buffer */ - gss_buffer_t, /* output_message_buffer */ - int *, /* conf_state */ - int * /* qop_state */ - ); - -#endif /* GSSAPI_H_ */ diff --git a/gss/internal.h b/gss/internal.h deleted file mode 100644 index 26ca9625..00000000 --- a/gss/internal.h +++ /dev/null @@ -1,45 +0,0 @@ -/* internal.h Internal header file for shishi GSS-API. - * Copyright (C) 2002, 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef _GSS_INTERNAL_H -#define _GSS_INTERNAL_H - -#include "../lib/internal.h" -#include "gssapi.h" - -struct gss_ctx_id_t -{ - int foo; -}; - -struct gss_cred_id_t -{ - int foo; -}; - -struct gss_name_t -{ - int length; - char *value; - gss_OID type; -}; - -#endif /* _GSS_INTERNAL_H */ diff --git a/gss/misc.c b/gss/misc.c deleted file mode 100644 index 76220485..00000000 --- a/gss/misc.c +++ /dev/null @@ -1,98 +0,0 @@ -/* misc.c Implementation of GSS-API Miscellaneous functions. - * Copyright (C) 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "internal.h" - -OM_uint32 -gss_add_oid_set_member (OM_uint32 * minor_status, - const gss_OID member_oid, gss_OID_set * oid_set) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_create_empty_oid_set (OM_uint32 * minor_status, gss_OID_set * oid_set) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_display_status (OM_uint32 * minor_status, - OM_uint32 status_value, - int status_type, - const gss_OID mech_type, - OM_uint32 * message_context, gss_buffer_t status_string) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_indicate_mechs (OM_uint32 * minor_status, gss_OID_set * mech_set) -{ - return GSS_S_FAILURE; -} - -/** - * gss_release_buffer: - * @minor_status: Mechanism specific status code. - * @buffer: The storage associated with the buffer will be deleted. - * The gss_buffer_desc object will not be freed, but its length field - * will be zeroed. - * - * Free storage associated with a buffer. The storage must have been - * allocated by a GSS-API routine. In addition to freeing the - * associated storage, the routine will zero the length field in the - * descriptor to which the buffer parameter refers, and - * implementations are encouraged to additionally set the pointer - * field in the descriptor to NULL. Any buffer object returned by a - * GSS-API routine may be passed to gss_release_buffer (even if there - * is no storage associated with the buffer). - * - * Return value: Returns GSS_S_COMPLETE for successful completion. - **/ -OM_uint32 -gss_release_buffer (OM_uint32 * minor_status, gss_buffer_t buffer) -{ - if (buffer != GSS_C_NO_BUFFER) - { - if (buffer->value) - free (buffer->value); - buffer->length = 0; - } - - if (minor_status) - *minor_status = 0; - return GSS_S_COMPLETE; -} - -OM_uint32 -gss_release_oid_set (OM_uint32 * minor_status, gss_OID_set * set) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_test_oid_set_member (OM_uint32 * minor_status, - const gss_OID member, - const gss_OID_set set, int *present) -{ - return GSS_S_FAILURE; -} diff --git a/gss/msg.c b/gss/msg.c deleted file mode 100644 index 5e7974ec..00000000 --- a/gss/msg.c +++ /dev/null @@ -1,61 +0,0 @@ -/* name.c Implementation of GSS-API Name Manipulation functions. - * Copyright (C) 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "internal.h" - -OM_uint32 -gss_get_mic (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, - gss_qop_t qop_req, - const gss_buffer_t message_buffer, gss_buffer_t message_token) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_verify_mic (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, - const gss_buffer_t message_buffer, - const gss_buffer_t token_buffer, gss_qop_t * qop_state) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_wrap (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, - int conf_req_flag, - gss_qop_t qop_req, - const gss_buffer_t input_message_buffer, - int *conf_state, gss_buffer_t output_message_buffer) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_unwrap (OM_uint32 * minor_status, - const gss_ctx_id_t context_handle, - const gss_buffer_t input_message_buffer, - gss_buffer_t output_message_buffer, - int *conf_state, gss_qop_t * qop_state) -{ - return GSS_S_FAILURE; -} diff --git a/gss/name.c b/gss/name.c deleted file mode 100644 index 15169b29..00000000 --- a/gss/name.c +++ /dev/null @@ -1,262 +0,0 @@ -/* name.c Implementation of GSS-API Name Manipulation functions. - * Copyright (C) 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "internal.h" - -/** - * gss_import_name: - * @minor_status: Mechanism specific status code - * @input_name_buffer: buffer containing contiguous string name to convert - * @input_name_type: Optional Object ID specifying type of printable - * name. Applications may specify either GSS_C_NO_OID to use a - * mechanism-specific default printable syntax, or an OID recognized - * by the GSS-API implementation to name a specific namespace. - * @output_name: returned name in internal form. Storage associated - * with this name must be freed by the application after use with a call - * to gss_release_name(). - * - * Convert a contiguous string name to internal form. In general, the - * internal name returned (via the parameter) will not - * be an MN; the exception to this is if the - * indicates that the contiguous string provided via the - * parameter is of type GSS_C_NT_EXPORT_NAME, in - * which case the returned internal name will be an MN for the - * mechanism that exported the name. - * - * Return value: Returns GSS_S_COMPLETE for successful completion, - * GSS_S_BAD_NAMETYPE when the input_name_type was unrecognized, - * GSS_S_BAD_NAME when the input_name parameter could not be - * interpreted as a name of the specified type, and GSS_S_BAD_MECH - * when the input name-type was GSS_C_NT_EXPORT_NAME, but the - * mechanism contained within the input-name is not supported. - **/ -OM_uint32 -gss_import_name (OM_uint32 * minor_status, - const gss_buffer_t input_name_buffer, - const gss_OID input_name_type, gss_name_t * output_name) -{ - if (!output_name) - return GSS_S_FAILURE; - - *output_name = malloc (sizeof (*output_name)); - if (!*output_name) - return GSS_S_FAILURE; - - (*output_name)->length = input_name_buffer->length; - (*output_name)->value = malloc (input_name_buffer->length); - if (!(*output_name)->value) - return GSS_S_FAILURE; - - memcpy ((*output_name)->value, input_name_buffer->value, - input_name_buffer->length); - - if (minor_status) - *minor_status = 0; - return GSS_S_COMPLETE; -} - -/** - * gss_display_name: - * @minor_status: Mechanism specific status code. - * @input_name: Name to be displayed - * @output_name_buffer: Buffer to receive textual name string. The - * application must free storage associated with this name after use - * with a call to gss_release_buffer(). - * @output_name_type: Optional type of the returned name. The - * returned gss_OID will be a pointer into static storage, and should - * be treated as read-only by the caller (in particular, the - * application should not attempt to free it). Specify NULL if not - * required. - * - * Allows an application to obtain a textual representation of an - * opaque internal-form name for display purposes. The syntax of a - * printable name is defined by the GSS-API implementation. - * - * If input_name denotes an anonymous principal, the implementation - * should return the gss_OID value GSS_C_NT_ANONYMOUS as the - * output_name_type, and a textual name that is syntactically distinct - * from all valid supported printable names in output_name_buffer. - * - * If input_name was created by a call to gss_import_name, specifying - * GSS_C_NO_OID as the name-type, implementations that employ lazy - * conversion between name types may return GSS_C_NO_OID via the - * output_name_type parameter. - * - * Return value: Returns GSS_S_COMPLETE for successful completion, - * GSS_S_BAD_NAME when input_name was ill-formed. - **/ -OM_uint32 -gss_display_name (OM_uint32 * minor_status, - const gss_name_t input_name, - gss_buffer_t output_name_buffer, gss_OID * output_name_type) -{ - if (!input_name) - return GSS_S_BAD_NAME; - - output_name_buffer->length = input_name->length; - output_name_buffer->value = malloc (input_name->length); - if (!output_name_buffer->value) - return GSS_S_FAILURE; - memcpy (output_name_buffer->value, input_name->value, input_name->length); - - if (output_name_type) - *output_name_type = &input_name->type; - - if (minor_status) - *minor_status = 0; - return GSS_S_COMPLETE; -} - -/** - * gss_compare_name: - * @minor_status: Mechanism specific status code. - * @name1: Internal-form name. - * @name2: Internal-form name. - * @name_equal: non-zero if names refer to same entity. - * - * Allows an application to compare two internal-form names to - * determine whether they refer to the same entity. - * - * If either name presented to gss_compare_name denotes an anonymous - * principal, the routines should indicate that the two names do not - * refer to the same identity. - * - * Return value: Returns GSS_S_COMPLETE for successful completion, - * GSS_S_BAD_NAMETYPE when the two names were of incomparable types, - * and GSS_S_BAD_NAME if one or both of name1 or name2 was ill-formed. - * - **/ -OM_uint32 -gss_compare_name (OM_uint32 * minor_status, - const gss_name_t name1, - const gss_name_t name2, int *name_equal) -{ - if (!name1 || !name2) - return GSS_S_BAD_NAME; - - if (name1->type != name2->type) /* XXX only compares pointers */ - return GSS_S_BAD_NAMETYPE; - - name_equal == (name1->length == name2->length) && - memcmp(name1->value, name2->value, name1->length) == 0; - - if (minor_status) - *minor_status = 0; - return GSS_S_COMPLETE; -} - -/** - * gss_release_name: - * @minor_status: Mechanism specific status code. - * @name: The name to be deleted. - * - * Free GSSAPI-allocated storage associated with an internal-form - * name. Implementations are encouraged to set the name to - * GSS_C_NO_NAME on successful completion of this call. - * - * Return value: Returns GSS_S_COMPLETE for successful completion, and - * GSS_S_BAD_NAME when the name parameter did not contain a valid - * name. - **/ -OM_uint32 -gss_release_name (OM_uint32 * minor_status, gss_name_t * name) -{ - if (!name || *name == GSS_C_NO_NAME) - return GSS_S_BAD_NAME; - - if ((*name)->value) - free ((*name)->value); - - free(*name); - *name = GSS_C_NO_NAME; - - if (minor_status) - *minor_status = 0; - return GSS_S_COMPLETE; -} - -OM_uint32 -gss_inquire_names_for_mech (OM_uint32 * minor_status, - const gss_OID mechanism, gss_OID_set * name_types) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_inquire_mechs_for_name (OM_uint32 * minor_status, - const gss_name_t input_name, - gss_OID_set * mech_types) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_export_name (OM_uint32 * minor_status, - const gss_name_t input_name, gss_buffer_t exported_name) -{ - return GSS_S_FAILURE; -} - -OM_uint32 -gss_canonicalize_name (OM_uint32 * minor_status, - const gss_name_t input_name, - const gss_OID mech_type, gss_name_t * output_name) -{ - return GSS_S_FAILURE; -} - -/** - * gss_duplicate_name: - * @minor_status: Mechanism specific status code. - * @src_name: Internal name to be duplicated. - * @dest_name: The resultant copy of . Storage associated - * with this name must be freed by the application after use with a - * call to gss_release_name(). - * - * Create an exact duplicate of the existing internal name src_name. - * The new dest_name will be independent of src_name (i.e. src_name - * and dest_name must both be released, and the release of one shall - * not affect the validity of the other). - * - * Return value: Returns GSS_S_COMPLETE for successful completion, and - * GSS_S_BAD_NAME when the src_name parameter was ill-formed. - **/ -OM_uint32 -gss_duplicate_name (OM_uint32 * minor_status, - const gss_name_t src_name, gss_name_t * dest_name) -{ - if (src_name == GSS_C_NO_NAME) - return GSS_S_BAD_NAME; - - if (!dest_name || !*dest_name) - return GSS_S_FAILURE; - - (*dest_name)->type = src_name->type; - (*dest_name)->length = src_name->length; - (*dest_name)->value = malloc(src_name->length); - if (!(*dest_name)->value) - return GSS_S_FAILURE; - memcpy((*dest_name)->value, src_name->value, src_name->length); - - if (minor_status) - *minor_status = 0; - return GSS_S_COMPLETE; -} diff --git a/gss/obsolete.c b/gss/obsolete.c deleted file mode 100644 index 517c21ae..00000000 --- a/gss/obsolete.c +++ /dev/null @@ -1,77 +0,0 @@ -/* obsolete.c Obsolete GSS-API v1 compatibility mappings. - * Copyright (C) 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "internal.h" - -#define WARN(msg) fprintf(stderr, "warning: " msg "\n"); - -OM_uint32 -gss_sign (OM_uint32 * minor_status, - gss_ctx_id_t context_handle, - int qop_req, - gss_buffer_t message_buffer, gss_buffer_t message_token) -{ - WARN ("gss_sign() is obsolete, use gss_get_mic() instead."); - - return gss_get_mic (minor_status, context_handle, - qop_req, message_buffer, message_token); -} - - -OM_uint32 -gss_verify (OM_uint32 * minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t message_buffer, - gss_buffer_t token_buffer, int *qop_state) -{ - WARN ("gss_verify() is obsolete, use gss_verify_mic() instead."); - - return gss_verify_mic (minor_status, context_handle, message_buffer, - token_buffer, qop_state); -} - -OM_uint32 -gss_seal (OM_uint32 * minor_status, - gss_ctx_id_t context_handle, - int conf_req_flag, - int qop_req, - gss_buffer_t input_message_buffer, - int *conf_state, gss_buffer_t output_message_buffer) -{ - WARN ("gss_seal() is obsolete, use gss_wap() instead."); - - return gss_wrap (minor_status, context_handle, conf_req_flag, qop_req, - input_message_buffer, conf_state, output_message_buffer); -} - - -OM_uint32 -gss_unseal (OM_uint32 * minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t input_message_buffer, - gss_buffer_t output_message_buffer, - int *conf_state, int *qop_state) -{ - WARN ("gss_unseal() is obsolete, use gss_unwrap() instead."); - - return gss_unwrap (minor_status, context_handle, input_message_buffer, - output_message_buffer, conf_state, qop_state); -} diff --git a/gss/oid.c b/gss/oid.c deleted file mode 100644 index 367bfdb0..00000000 --- a/gss/oid.c +++ /dev/null @@ -1,139 +0,0 @@ -/* oid.c Definition of static GSS-API OIDs. - * Copyright (C) 2003 Simon Josefsson - * - * This file is part of Shishi. - * - * Shishi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Shishi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Shishi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "internal.h" - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x01"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant - * GSS_C_NT_USER_NAME should be initialized to point - * to that gss_OID_desc. - */ -gss_OID_desc shishi_GSS_C_NT_USER_NAME = { - 10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01" -}; -gss_OID GSS_C_NT_USER_NAME = &shishi_GSS_C_NT_USER_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x02"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. - * The constant GSS_C_NT_MACHINE_UID_NAME should be - * initialized to point to that gss_OID_desc. - */ -gss_OID_desc shishi_GSS_C_NT_MACHINE_UID_NAME = { - 10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02" -}; -gss_OID GSS_C_NT_MACHINE_UID_NAME = &shishi_GSS_C_NT_MACHINE_UID_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x03"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. - * The constant GSS_C_NT_STRING_UID_NAME should be - * initialized to point to that gss_OID_desc. - */ -gss_OID_desc shishi_GSS_C_NT_STRING_UID_NAME = { - 10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03" -}; -gss_OID GSS_C_NT_STRING_UID_NAME = &shishi_GSS_C_NT_STRING_UID_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, - * corresponding to an object-identifier value of - * {iso(1) org(3) dod(6) internet(1) security(5) - * nametypes(6) gss-host-based-services(2)). The constant - * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point - * to that gss_OID_desc. This is a deprecated OID value, and - * implementations wishing to support hostbased-service names - * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, - * defined below, to identify such names; - * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym - * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input - * parameter, but should not be emitted by GSS-API - * implementations - */ -gss_OID_desc shishi_GSS_C_NT_HOSTBASED_SERVICE_X = { - 6, (void *) "\x2b\x06\x01\x05\x06\x02" -}; -gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = &shishi_GSS_C_NT_HOSTBASED_SERVICE_X; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x04"}, corresponding to an - * object-identifier value of {iso(1) member-body(2) - * Unites States(840) mit(113554) infosys(1) gssapi(2) - * generic(1) service_name(4)}. The constant - * GSS_C_NT_HOSTBASED_SERVICE should be initialized - * to point to that gss_OID_desc. - */ -gss_OID_desc shishi_GSS_C_NT_HOSTBASED_SERVICE = { - 10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04" -}; -gss_OID GSS_C_NT_HOSTBASED_SERVICE = &shishi_GSS_C_NT_HOSTBASED_SERVICE; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, - * corresponding to an object identifier value of - * {1(iso), 3(org), 6(dod), 1(internet), 5(security), - * 6(nametypes), 3(gss-anonymous-name)}. The constant - * and GSS_C_NT_ANONYMOUS should be initialized to point - * to that gss_OID_desc. - */ -gss_OID_desc shishi_GSS_C_NT_ANONYMOUS = { - 6, (void *) "\x2b\x06\01\x05\x06\x03" -}; -gss_OID GSS_C_NT_ANONYMOUS = &shishi_GSS_C_NT_ANONYMOUS; - - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, - * corresponding to an object-identifier value of - * {1(iso), 3(org), 6(dod), 1(internet), 5(security), - * 6(nametypes), 4(gss-api-exported-name)}. The constant - * GSS_C_NT_EXPORT_NAME should be initialized to point - * to that gss_OID_desc. - */ -gss_OID_desc shishi_GSS_C_NT_EXPORT_NAME = { - 6, (void *) "\x2b\x06\x01\x05\x06\x04" -}; -gss_OID GSS_C_NT_EXPORT_NAME = &shishi_GSS_C_NT_EXPORT_NAME; diff --git a/shishi-gss.pc.in b/shishi-gss.pc.in deleted file mode 100644 index 4410ca1c..00000000 --- a/shishi-gss.pc.in +++ /dev/null @@ -1,21 +0,0 @@ -# Process this file with autoconf to produce a pkg-config metadata file. -# Copyright 2002, 2003 Simon Josefsson -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This file is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Shishi GSS-API -Description: GSS-API interface to Shishi, an implementation of RFC 1510(bis). -Version: @VERSION@ -Libs: -L${libdir} -R${libdir} -lshishi-gss -Cflags: -I${includedir} diff --git a/tests/Makefile.am b/tests/Makefile.am index 24d8efd3..072cb5ff 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,13 +20,11 @@ EXTRA_DIST = utils.c -TESTS = crypto ticketset authenticator gztime gss +TESTS = crypto ticketset authenticator gztime INCLUDES = -I$(top_srcdir)/lib LDADD = ../lib/libshishi.la -gss_LDADD = ../gss/libshishi-gss.la - noinst_PROGRAMS = $(TESTS) indent: -- 2.11.4.GIT