/*1* Copyright (c) 2006 Kungliga Tekniska Högskolan2* (Royal Institute of Technology, Stockholm, Sweden).3* All rights reserved.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8*9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11*12* 2. Redistributions in binary form must reproduce the above copyright13* notice, this list of conditions and the following disclaimer in the14* documentation and/or other materials provided with the distribution.15*16* 3. Neither the name of the Institute nor the names of its contributors17* may be used to endorse or promote products derived from this software18* without specific prior written permission.19*20* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND21* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE22* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE24* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL25* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS26* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)27* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT28* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY29* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF30* SUCH DAMAGE.31*/3233/* $Id$ */3435#ifndef HEIMDAL_KRB5_PAC_PLUGIN_H36#define HEIMDAL_KRB5_PAC_PLUGIN_H 13738#include <krb5.h>3940/*41* The PAC generate function should allocate a krb5_pac using42* krb5_pac_init and fill in the PAC structure for the principal using43* krb5_pac_add_buffer.44*45* The PAC verify function should verify all components in the PAC46* using krb5_pac_get_types and krb5_pac_get_buffer for all types.47*48* Check client access function check if the client is authorized.49*/5051struct hdb_entry_ex;5253typedef krb5_error_code54(*krb5plugin_windc_pac_generate)(void *, krb5_context,55struct hdb_entry_ex *, krb5_pac *);5657typedef krb5_error_code58(*krb5plugin_windc_pac_verify)(void *, krb5_context,59const krb5_principal, /* new ticket client */60const krb5_principal, /* delegation proxy */61struct hdb_entry_ex *,/* client */62struct hdb_entry_ex *,/* server */63struct hdb_entry_ex *,/* krbtgt */64krb5_pac *);6566typedef krb5_error_code67(*krb5plugin_windc_client_access)(68void *, krb5_context,69krb5_kdc_configuration *config,70hdb_entry_ex *, const char *,71hdb_entry_ex *, const char *,72KDC_REQ *, krb5_data *);737475#define KRB5_WINDC_PLUGIN_MINOR 676#define KRB5_WINDC_PLUGING_MINOR KRB5_WINDC_PLUGIN_MINOR7778typedef struct krb5plugin_windc_ftable {79int minor_version;80krb5_error_code (*init)(krb5_context, void **);81void (*fini)(void *);82krb5plugin_windc_pac_generate pac_generate;83krb5plugin_windc_pac_verify pac_verify;84krb5plugin_windc_client_access client_access;85} krb5plugin_windc_ftable;8687#endif /* HEIMDAL_KRB5_PAC_PLUGIN_H */88899091