/*1* Copyright (c) 1997-2003 Kungliga Tekniska Högskolan2* (Royal Institute of Technology, Stockholm, Sweden).3*4* Copyright (c) 2005 Andrew Bartlett <[email protected]>5*6* All rights reserved.7*8* Redistribution and use in source and binary forms, with or without9* modification, are permitted provided that the following conditions10* are met:11*12* 1. Redistributions of source code must retain the above copyright13* notice, this list of conditions and the following disclaimer.14*15* 2. Redistributions in binary form must reproduce the above copyright16* notice, this list of conditions and the following disclaimer in the17* documentation and/or other materials provided with the distribution.18*19* 3. Neither the name of the Institute nor the names of its contributors20* may be used to endorse or promote products derived from this software21* without specific prior written permission.22*23* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND24* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE25* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE26* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE27* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL28* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS29* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)30* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT31* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY32* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF33* SUCH DAMAGE.34*/3536/*37* $Id$38*/3940#ifndef __KDC_H__41#define __KDC_H__4243#include <hdb.h>44#include <krb5.h>4546enum krb5_kdc_trpolicy {47TRPOLICY_ALWAYS_CHECK,48TRPOLICY_ALLOW_PER_PRINCIPAL,49TRPOLICY_ALWAYS_HONOUR_REQUEST50};5152typedef struct krb5_kdc_configuration {53krb5_boolean require_preauth; /* require preauth for all principals */54time_t kdc_warn_pwexpire; /* time before expiration to print a warning */5556struct HDB **db;57int num_db;5859krb5_boolean encode_as_rep_as_tgs_rep; /* bug compatibility */6061krb5_boolean tgt_use_strongest_session_key;62krb5_boolean preauth_use_strongest_session_key;63krb5_boolean svc_use_strongest_session_key;64krb5_boolean use_strongest_server_key;6566krb5_boolean check_ticket_addresses;67krb5_boolean allow_null_ticket_addresses;68krb5_boolean allow_anonymous;69enum krb5_kdc_trpolicy trpolicy;7071krb5_boolean enable_pkinit;72krb5_boolean pkinit_princ_in_cert;73const char *pkinit_kdc_identity;74const char *pkinit_kdc_anchors;75const char *pkinit_kdc_friendly_name;76const char *pkinit_kdc_ocsp_file;77char **pkinit_kdc_cert_pool;78char **pkinit_kdc_revoke;79int pkinit_dh_min_bits;80int pkinit_require_binding;81int pkinit_allow_proxy_certs;8283krb5_log_facility *logf;8485int enable_digest;86int digests_allowed;8788size_t max_datagram_reply_length;8990int enable_kx509;91const char *kx509_template;92const char *kx509_ca;9394} krb5_kdc_configuration;9596struct krb5_kdc_service {97unsigned int flags;98#define KS_KRB5 199#define KS_NO_LENGTH 2100krb5_error_code (*process)(krb5_context context,101krb5_kdc_configuration *config,102krb5_data *req_buffer,103krb5_data *reply,104const char *from,105struct sockaddr *addr,106int datagram_reply,107int *claim);108};109110#include <kdc-protos.h>111112#endif113114115