17c478bd9Sstevel@tonic-gate /* 2*10db1377Sgtb * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate /* This is the prologue to krb5.h */ 77c478bd9Sstevel@tonic-gate /* Unfortunately some of these defines are compiler dependent */ 87c478bd9Sstevel@tonic-gate #ifndef _KRB5_H 97c478bd9Sstevel@tonic-gate #define _KRB5_H 107c478bd9Sstevel@tonic-gate 117c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gate #define SIZEOF_INT 4 147c478bd9Sstevel@tonic-gate 157c478bd9Sstevel@tonic-gate #ifdef _LP64 167c478bd9Sstevel@tonic-gate #define SIZEOF_LONG 8 177c478bd9Sstevel@tonic-gate #else 187c478bd9Sstevel@tonic-gate #define SIZEOF_LONG 4 197c478bd9Sstevel@tonic-gate #endif 207c478bd9Sstevel@tonic-gate 217c478bd9Sstevel@tonic-gate #define SIZEOF_SHORT 2 227c478bd9Sstevel@tonic-gate #define HAVE_STDARG_H 1 237c478bd9Sstevel@tonic-gate #define HAVE_SYS_TYPES_H 1 247c478bd9Sstevel@tonic-gate /* End of prologue section */ 257c478bd9Sstevel@tonic-gate /* 267c478bd9Sstevel@tonic-gate * include/krb5.h 277c478bd9Sstevel@tonic-gate * 287c478bd9Sstevel@tonic-gate * Copyright 1989,1990,1995 by the Massachusetts Institute of Technology. 297c478bd9Sstevel@tonic-gate * All Rights Reserved. 307c478bd9Sstevel@tonic-gate * 317c478bd9Sstevel@tonic-gate * Export of this software from the United States of America may 327c478bd9Sstevel@tonic-gate * require a specific license from the United States Government. 337c478bd9Sstevel@tonic-gate * It is the responsibility of any person or organization contemplating 347c478bd9Sstevel@tonic-gate * export to obtain such a license before exporting. 357c478bd9Sstevel@tonic-gate * 367c478bd9Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 377c478bd9Sstevel@tonic-gate * distribute this software and its documentation for any purpose and 387c478bd9Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright 397c478bd9Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and 407c478bd9Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that 417c478bd9Sstevel@tonic-gate * the name of M.I.T. not be used in advertising or publicity pertaining 427c478bd9Sstevel@tonic-gate * to distribution of the software without specific, written prior 437c478bd9Sstevel@tonic-gate * permission. Furthermore if you modify this software you must label 447c478bd9Sstevel@tonic-gate * your software as modified software and not distribute it in such a 457c478bd9Sstevel@tonic-gate * fashion that it might be confused with the original M.I.T. software. 467c478bd9Sstevel@tonic-gate * M.I.T. makes no representations about the suitability of 477c478bd9Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express 487c478bd9Sstevel@tonic-gate * or implied warranty. 497c478bd9Sstevel@tonic-gate * 507c478bd9Sstevel@tonic-gate * 517c478bd9Sstevel@tonic-gate * General definitions for Kerberos version 5. 527c478bd9Sstevel@tonic-gate */ 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate /* 557c478bd9Sstevel@tonic-gate * Copyright (C) 1998 by the FundsXpress, INC. 567c478bd9Sstevel@tonic-gate * 577c478bd9Sstevel@tonic-gate * All rights reserved. 587c478bd9Sstevel@tonic-gate * 597c478bd9Sstevel@tonic-gate * Export of this software from the United States of America may require 607c478bd9Sstevel@tonic-gate * a specific license from the United States Government. It is the 617c478bd9Sstevel@tonic-gate * responsibility of any person or organization contemplating export to 627c478bd9Sstevel@tonic-gate * obtain such a license before exporting. 637c478bd9Sstevel@tonic-gate * 647c478bd9Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 657c478bd9Sstevel@tonic-gate * distribute this software and its documentation for any purpose and 667c478bd9Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright 677c478bd9Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and 687c478bd9Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that 697c478bd9Sstevel@tonic-gate * the name of FundsXpress. not be used in advertising or publicity pertaining 707c478bd9Sstevel@tonic-gate * to distribution of the software without specific, written prior 717c478bd9Sstevel@tonic-gate * permission. FundsXpress makes no representations about the suitability of 727c478bd9Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express 737c478bd9Sstevel@tonic-gate * or implied warranty. 747c478bd9Sstevel@tonic-gate * 757c478bd9Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 767c478bd9Sstevel@tonic-gate * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 777c478bd9Sstevel@tonic-gate * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 787c478bd9Sstevel@tonic-gate */ 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate #ifndef KRB5_GENERAL__ 817c478bd9Sstevel@tonic-gate #define KRB5_GENERAL__ 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate #ifdef _KERNEL 847c478bd9Sstevel@tonic-gate #include <sys/systm.h> 857c478bd9Sstevel@tonic-gate #include <sys/kmem.h> 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate #include <sys/crypto/common.h> 887c478bd9Sstevel@tonic-gate #include <sys/crypto/api.h> 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate /* 917c478bd9Sstevel@tonic-gate * Just to be safe lets make sure the buffers are zero'ed after 927c478bd9Sstevel@tonic-gate * malloc() as some code assumes this is the case. To avoid warnings 937c478bd9Sstevel@tonic-gate * of duplicated defines let remove the old one if present. 947c478bd9Sstevel@tonic-gate */ 957c478bd9Sstevel@tonic-gate #ifdef MALLOC 967c478bd9Sstevel@tonic-gate #undef MALLOC 977c478bd9Sstevel@tonic-gate #endif 987c478bd9Sstevel@tonic-gate #define MALLOC(n) kmem_zalloc((n), KM_SLEEP) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate #define FREE(x, n) kmem_free((x), (n)) 1017c478bd9Sstevel@tonic-gate #define CALLOC(n, s) kmem_zalloc((n)*(s), KM_SLEEP) 1027c478bd9Sstevel@tonic-gate #define strcpy(dst,src,n) bcopy((src),(dst),(n)) 1037c478bd9Sstevel@tonic-gate #define mutex_lock(lck) mutex_enter(lck) 1047c478bd9Sstevel@tonic-gate #define mutex_unlock(lck) mutex_exit(lck) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate #else /* !_KERNEL */ 1077c478bd9Sstevel@tonic-gate #define MALLOC(n) malloc(n) 1087c478bd9Sstevel@tonic-gate #define FREE(x, n) free(x) 1097c478bd9Sstevel@tonic-gate #define CALLOC(n, s) calloc((n), (s)) 1107c478bd9Sstevel@tonic-gate #include <stdlib.h> 1117c478bd9Sstevel@tonic-gate #include <thread.h> 1127c478bd9Sstevel@tonic-gate #include <synch.h> 1137c478bd9Sstevel@tonic-gate #include <security/cryptoki.h> 114505d05c7Sgtb #include <limits.h> /* for *_MAX */ 1157c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 1167c478bd9Sstevel@tonic-gate 117505d05c7Sgtb /* By default, do not expose deprecated interfaces. */ 118505d05c7Sgtb /* SUNW14resync - we need to enable this for rlogind and such */ 119505d05c7Sgtb #ifndef KRB5_DEPRECATED 120505d05c7Sgtb #define KRB5_DEPRECATED 1 121505d05c7Sgtb #endif 122505d05c7Sgtb /* Do not expose private interfaces. Build system will override. */ 123505d05c7Sgtb /* SUNW14resync - for the Solaris build we set it to 1 here */ 124505d05c7Sgtb #ifndef KRB5_PRIVATE 125505d05c7Sgtb #define KRB5_PRIVATE 1 126505d05c7Sgtb #endif 127505d05c7Sgtb 128505d05c7Sgtb #if defined(__MACH__) && defined(__APPLE__) 129505d05c7Sgtb # include <TargetConditionals.h> 130505d05c7Sgtb # if TARGET_RT_MAC_CFM 131505d05c7Sgtb # error "Use KfM 4.0 SDK headers for CFM compilation." 132505d05c7Sgtb # endif 133505d05c7Sgtb #endif 1347c478bd9Sstevel@tonic-gate 135505d05c7Sgtb #if (defined(_MSDOS) || defined(_WIN32)) 1367c478bd9Sstevel@tonic-gate #include <win-mac.h> 1377c478bd9Sstevel@tonic-gate #endif 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate #ifndef KRB5_CONFIG__ 1407c478bd9Sstevel@tonic-gate #ifndef KRB5_CALLCONV 1417c478bd9Sstevel@tonic-gate #define KRB5_CALLCONV 1427c478bd9Sstevel@tonic-gate #define KRB5_CALLCONV_C 1437c478bd9Sstevel@tonic-gate #endif /* !KRB5_CALLCONV */ 1447c478bd9Sstevel@tonic-gate #endif /* !KRB5_CONFIG__ */ 1457c478bd9Sstevel@tonic-gate 146505d05c7Sgtb #ifndef KRB5_CALLCONV_WRONG 147505d05c7Sgtb #define KRB5_CALLCONV_WRONG 148505d05c7Sgtb #endif 149505d05c7Sgtb 150505d05c7Sgtb /* SUNW14resync XXX */ 1517c478bd9Sstevel@tonic-gate #include <sys/types.h> 1527c478bd9Sstevel@tonic-gate #include <sys/socket.h> 1537c478bd9Sstevel@tonic-gate 1547c478bd9Sstevel@tonic-gate #ifndef THREEPARAMOPEN 1557c478bd9Sstevel@tonic-gate #define THREEPARAMOPEN(x,y,z) open(x,y,z) 1567c478bd9Sstevel@tonic-gate #endif 1577c478bd9Sstevel@tonic-gate 158505d05c7Sgtb 1597c478bd9Sstevel@tonic-gate /* 1607c478bd9Sstevel@tonic-gate * Solaris Kerberos: 161*10db1377Sgtb * Samba needs a couple of these interfaces so old crypto is enabled. 1627c478bd9Sstevel@tonic-gate */ 163*10db1377Sgtb #define KRB5_OLD_CRYPTO 1647c478bd9Sstevel@tonic-gate 1657c478bd9Sstevel@tonic-gate 166505d05c7Sgtb #ifndef KRB5INT_BEGIN_DECLS 167505d05c7Sgtb #if defined(__cplusplus) 168505d05c7Sgtb #define KRB5INT_BEGIN_DECLS extern "C" { 169505d05c7Sgtb #define KRB5INT_END_DECLS } 170505d05c7Sgtb #else 171505d05c7Sgtb #define KRB5INT_BEGIN_DECLS 172505d05c7Sgtb #define KRB5INT_END_DECLS 173505d05c7Sgtb #endif 174505d05c7Sgtb #endif /* KRB5INT_BEGIN_DECLS */ 1757c478bd9Sstevel@tonic-gate 176505d05c7Sgtb #if TARGET_OS_MAC 177505d05c7Sgtb # pragma options align=mac68k 1787c478bd9Sstevel@tonic-gate #endif 1797c478bd9Sstevel@tonic-gate 180505d05c7Sgtb /* from profile.h */ 181505d05c7Sgtb struct _profile_t; 182505d05c7Sgtb /* typedef struct _profile_t *profile_t; */ 183505d05c7Sgtb 184505d05c7Sgtb 1857c478bd9Sstevel@tonic-gate /* 1867c478bd9Sstevel@tonic-gate * begin wordsize.h 1877c478bd9Sstevel@tonic-gate */ 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate /* 1907c478bd9Sstevel@tonic-gate * Word-size related definition. 1917c478bd9Sstevel@tonic-gate */ 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate typedef unsigned char krb5_octet; 1947c478bd9Sstevel@tonic-gate 195505d05c7Sgtb #if INT_MAX == 0x7fff 1967c478bd9Sstevel@tonic-gate typedef int krb5_int16; 1977c478bd9Sstevel@tonic-gate typedef unsigned int krb5_ui_2; 198505d05c7Sgtb #elif SHRT_MAX == 0x7fff 1997c478bd9Sstevel@tonic-gate typedef short krb5_int16; 2007c478bd9Sstevel@tonic-gate typedef unsigned short krb5_ui_2; 2017c478bd9Sstevel@tonic-gate #else 202505d05c7Sgtb #error undefined 16 bit type 2037c478bd9Sstevel@tonic-gate #endif 2047c478bd9Sstevel@tonic-gate 205505d05c7Sgtb #if INT_MAX == 0x7fffffffL 2067c478bd9Sstevel@tonic-gate typedef int krb5_int32; 2077c478bd9Sstevel@tonic-gate typedef unsigned int krb5_ui_4; 208505d05c7Sgtb #elif LONG_MAX == 0x7fffffffL 2097c478bd9Sstevel@tonic-gate typedef long krb5_int32; 2107c478bd9Sstevel@tonic-gate typedef unsigned long krb5_ui_4; 211505d05c7Sgtb #elif SHRT_MAX == 0x7fffffffL 2127c478bd9Sstevel@tonic-gate typedef short krb5_int32; 2137c478bd9Sstevel@tonic-gate typedef unsigned short krb5_ui_4; 2147c478bd9Sstevel@tonic-gate #else 215505d05c7Sgtb #error: undefined 32 bit type 2167c478bd9Sstevel@tonic-gate #endif 2177c478bd9Sstevel@tonic-gate 218505d05c7Sgtb #define VALID_INT_BITS INT_MAX 219505d05c7Sgtb #define VALID_UINT_BITS UINT_MAX 220505d05c7Sgtb 2217c478bd9Sstevel@tonic-gate #define KRB5_INT32_MAX 2147483647 2227c478bd9Sstevel@tonic-gate /* this strange form is necessary since - is a unary operator, not a sign 2237c478bd9Sstevel@tonic-gate indicator */ 2247c478bd9Sstevel@tonic-gate #define KRB5_INT32_MIN (-KRB5_INT32_MAX-1) 2257c478bd9Sstevel@tonic-gate 2267c478bd9Sstevel@tonic-gate #define KRB5_INT16_MAX 65535 2277c478bd9Sstevel@tonic-gate /* this strange form is necessary since - is a unary operator, not a sign 2287c478bd9Sstevel@tonic-gate indicator */ 2297c478bd9Sstevel@tonic-gate #define KRB5_INT16_MIN (-KRB5_INT16_MAX-1) 2307c478bd9Sstevel@tonic-gate 2317c478bd9Sstevel@tonic-gate /* 2327c478bd9Sstevel@tonic-gate * end wordsize.h 2337c478bd9Sstevel@tonic-gate */ 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate /* 2367c478bd9Sstevel@tonic-gate * begin "base-defs.h" 2377c478bd9Sstevel@tonic-gate */ 2387c478bd9Sstevel@tonic-gate 2397c478bd9Sstevel@tonic-gate /* 2407c478bd9Sstevel@tonic-gate * Basic definitions for Kerberos V5 library 2417c478bd9Sstevel@tonic-gate */ 2427c478bd9Sstevel@tonic-gate 2437c478bd9Sstevel@tonic-gate #ifndef FALSE 2447c478bd9Sstevel@tonic-gate #define FALSE 0 2457c478bd9Sstevel@tonic-gate #endif 2467c478bd9Sstevel@tonic-gate #ifndef TRUE 2477c478bd9Sstevel@tonic-gate #define TRUE 1 2487c478bd9Sstevel@tonic-gate #endif 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate typedef unsigned int krb5_boolean; 2517c478bd9Sstevel@tonic-gate typedef unsigned int krb5_msgtype; 2527c478bd9Sstevel@tonic-gate typedef unsigned int krb5_kvno; 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_addrtype; 2557c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_enctype; 2567c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_cksumtype; 2577c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_authdatatype; 2587c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_keyusage; 2597c478bd9Sstevel@tonic-gate 2607c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_preauthtype; /* This may change, later on */ 2617c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_flags; 2627c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_timestamp; 2637c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_error_code; 2647c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_deltat; 2657c478bd9Sstevel@tonic-gate 2667c478bd9Sstevel@tonic-gate typedef krb5_error_code krb5_magic; 2677c478bd9Sstevel@tonic-gate 2687c478bd9Sstevel@tonic-gate typedef struct _krb5_data { 2697c478bd9Sstevel@tonic-gate krb5_magic magic; 2707c478bd9Sstevel@tonic-gate unsigned int length; 2717c478bd9Sstevel@tonic-gate char *data; 2727c478bd9Sstevel@tonic-gate } krb5_data; 2737c478bd9Sstevel@tonic-gate 274505d05c7Sgtb /* 275505d05c7Sgtb * Hack length for crypto library to use the afs_string_to_key It is 276505d05c7Sgtb * equivalent to -1 without possible sign extension 277505d05c7Sgtb * We also overload for an unset salt type length - which is also -1, but 278505d05c7Sgtb * hey, why not.... 279505d05c7Sgtb */ 280505d05c7Sgtb #define SALT_TYPE_AFS_LENGTH UINT_MAX 281505d05c7Sgtb #define SALT_TYPE_NO_LENGTH UINT_MAX 2827c478bd9Sstevel@tonic-gate 283505d05c7Sgtb typedef void * krb5_pointer; 284505d05c7Sgtb typedef void const * krb5_const_pointer; 2857c478bd9Sstevel@tonic-gate 2867c478bd9Sstevel@tonic-gate typedef struct krb5_principal_data { 2877c478bd9Sstevel@tonic-gate krb5_magic magic; 2887c478bd9Sstevel@tonic-gate krb5_data realm; 2897c478bd9Sstevel@tonic-gate krb5_data *data; /* An array of strings */ 2907c478bd9Sstevel@tonic-gate krb5_int32 length; 2917c478bd9Sstevel@tonic-gate krb5_int32 type; 2927c478bd9Sstevel@tonic-gate } krb5_principal_data; 2937c478bd9Sstevel@tonic-gate 2947c478bd9Sstevel@tonic-gate typedef krb5_principal_data * krb5_principal; 2957c478bd9Sstevel@tonic-gate 2967c478bd9Sstevel@tonic-gate /* 2977c478bd9Sstevel@tonic-gate * Per V5 spec on definition of principal types 2987c478bd9Sstevel@tonic-gate */ 2997c478bd9Sstevel@tonic-gate 3007c478bd9Sstevel@tonic-gate /* Name type not known */ 3017c478bd9Sstevel@tonic-gate #define KRB5_NT_UNKNOWN 0 3027c478bd9Sstevel@tonic-gate /* Just the name of the principal as in DCE, or for users */ 3037c478bd9Sstevel@tonic-gate #define KRB5_NT_PRINCIPAL 1 3047c478bd9Sstevel@tonic-gate /* Service and other unique instance (krbtgt) */ 3057c478bd9Sstevel@tonic-gate #define KRB5_NT_SRV_INST 2 3067c478bd9Sstevel@tonic-gate /* Service with host name as instance (telnet, rcommands) */ 3077c478bd9Sstevel@tonic-gate #define KRB5_NT_SRV_HST 3 3087c478bd9Sstevel@tonic-gate /* Service with host as remaining components */ 3097c478bd9Sstevel@tonic-gate #define KRB5_NT_SRV_XHST 4 3107c478bd9Sstevel@tonic-gate /* Unique ID */ 3117c478bd9Sstevel@tonic-gate #define KRB5_NT_UID 5 3127c478bd9Sstevel@tonic-gate 3137c478bd9Sstevel@tonic-gate /* constant version thereof: */ 314505d05c7Sgtb typedef const krb5_principal_data *krb5_const_principal; 3157c478bd9Sstevel@tonic-gate 3167c478bd9Sstevel@tonic-gate #define krb5_princ_realm(context, princ) (&(princ)->realm) 3177c478bd9Sstevel@tonic-gate #define krb5_princ_set_realm(context, princ,value) ((princ)->realm = *(value)) 3187c478bd9Sstevel@tonic-gate #define krb5_princ_set_realm_length(context, princ,value) (princ)->realm.length = (value) 3197c478bd9Sstevel@tonic-gate #define krb5_princ_set_realm_data(context, princ,value) (princ)->realm.data = (value) 3207c478bd9Sstevel@tonic-gate #define krb5_princ_size(context, princ) (princ)->length 3217c478bd9Sstevel@tonic-gate #define krb5_princ_type(context, princ) (princ)->type 3227c478bd9Sstevel@tonic-gate #define krb5_princ_name(context, princ) (princ)->data 323505d05c7Sgtb #define krb5_princ_component(context, princ,i) \ 324505d05c7Sgtb (((i) < krb5_princ_size(context, princ)) \ 325505d05c7Sgtb ? (princ)->data + (i) \ 326505d05c7Sgtb : NULL) 3277c478bd9Sstevel@tonic-gate 3287c478bd9Sstevel@tonic-gate /* 3297c478bd9Sstevel@tonic-gate * end "base-defs.h" 3307c478bd9Sstevel@tonic-gate */ 3317c478bd9Sstevel@tonic-gate 3327c478bd9Sstevel@tonic-gate /* 3337c478bd9Sstevel@tonic-gate * begin "hostaddr.h" 3347c478bd9Sstevel@tonic-gate */ 3357c478bd9Sstevel@tonic-gate 3367c478bd9Sstevel@tonic-gate /* structure for address */ 3377c478bd9Sstevel@tonic-gate typedef struct _krb5_address { 3387c478bd9Sstevel@tonic-gate krb5_magic magic; 3397c478bd9Sstevel@tonic-gate krb5_addrtype addrtype; 3407c478bd9Sstevel@tonic-gate unsigned int length; 3417c478bd9Sstevel@tonic-gate krb5_octet *contents; 3427c478bd9Sstevel@tonic-gate } krb5_address; 3437c478bd9Sstevel@tonic-gate 3447c478bd9Sstevel@tonic-gate /* per Kerberos v5 protocol spec */ 3457c478bd9Sstevel@tonic-gate #define ADDRTYPE_INET 0x0002 3467c478bd9Sstevel@tonic-gate #define ADDRTYPE_CHAOS 0x0005 3477c478bd9Sstevel@tonic-gate #define ADDRTYPE_XNS 0x0006 3487c478bd9Sstevel@tonic-gate #define ADDRTYPE_ISO 0x0007 3497c478bd9Sstevel@tonic-gate #define ADDRTYPE_DDP 0x0010 3507c478bd9Sstevel@tonic-gate #define ADDRTYPE_INET6 0x0018 3517c478bd9Sstevel@tonic-gate /* not yet in the spec... */ 3527c478bd9Sstevel@tonic-gate #define ADDRTYPE_ADDRPORT 0x0100 3537c478bd9Sstevel@tonic-gate #define ADDRTYPE_IPPORT 0x0101 3547c478bd9Sstevel@tonic-gate 3557c478bd9Sstevel@tonic-gate /* macros to determine if a type is a local type */ 3567c478bd9Sstevel@tonic-gate #define ADDRTYPE_IS_LOCAL(addrtype) (addrtype & 0x8000) 3577c478bd9Sstevel@tonic-gate 3587c478bd9Sstevel@tonic-gate /* 3597c478bd9Sstevel@tonic-gate * end "hostaddr.h" 3607c478bd9Sstevel@tonic-gate */ 3617c478bd9Sstevel@tonic-gate 3627c478bd9Sstevel@tonic-gate 3637c478bd9Sstevel@tonic-gate struct _krb5_context; 3647c478bd9Sstevel@tonic-gate typedef struct _krb5_context * krb5_context; 3657c478bd9Sstevel@tonic-gate 3667c478bd9Sstevel@tonic-gate struct _krb5_auth_context; 3677c478bd9Sstevel@tonic-gate typedef struct _krb5_auth_context * krb5_auth_context; 3687c478bd9Sstevel@tonic-gate 3697c478bd9Sstevel@tonic-gate struct _krb5_cryptosystem_entry; 3707c478bd9Sstevel@tonic-gate 371505d05c7Sgtb /* SUNW EF (I assume) crypto mods ... */ 3727c478bd9Sstevel@tonic-gate struct _krb5_keyblock; 3737c478bd9Sstevel@tonic-gate 3747c478bd9Sstevel@tonic-gate /* 3757c478bd9Sstevel@tonic-gate * keyblocks will contain a list of derived keys, 3767c478bd9Sstevel@tonic-gate * this structure will contain the derived key data. 3777c478bd9Sstevel@tonic-gate */ 3787c478bd9Sstevel@tonic-gate typedef struct _dk_node { 3797c478bd9Sstevel@tonic-gate krb5_keyusage usage; 3807c478bd9Sstevel@tonic-gate struct _krb5_keyblock *derived_key; 3817c478bd9Sstevel@tonic-gate uchar_t dkid; /* derived key identifier byte */ 3827c478bd9Sstevel@tonic-gate struct _dk_node *next; 3837c478bd9Sstevel@tonic-gate } krb5_dk_node; 3847c478bd9Sstevel@tonic-gate 3857c478bd9Sstevel@tonic-gate /* 3867c478bd9Sstevel@tonic-gate * begin "encryption.h" 3877c478bd9Sstevel@tonic-gate */ 3887c478bd9Sstevel@tonic-gate typedef struct _krb5_keyblock { 3897c478bd9Sstevel@tonic-gate krb5_magic magic; 3907c478bd9Sstevel@tonic-gate krb5_enctype enctype; 3917c478bd9Sstevel@tonic-gate unsigned int length; 3927c478bd9Sstevel@tonic-gate krb5_octet *contents; 3937c478bd9Sstevel@tonic-gate krb5_dk_node *dk_list; /* list of keys derived from this key */ 3947c478bd9Sstevel@tonic-gate #ifdef _KERNEL 3957c478bd9Sstevel@tonic-gate crypto_mech_type_t kef_mt; 3967c478bd9Sstevel@tonic-gate crypto_key_t kef_key; 3977c478bd9Sstevel@tonic-gate crypto_ctx_template_t key_tmpl; 3987c478bd9Sstevel@tonic-gate #else 3997c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey; /* PKCS#11 key object handle */ 4007c478bd9Sstevel@tonic-gate pid_t pid; /* fork safety */ 4017c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 4027c478bd9Sstevel@tonic-gate } krb5_keyblock; 4037c478bd9Sstevel@tonic-gate 4047c478bd9Sstevel@tonic-gate typedef struct _krb5_checksum { 4057c478bd9Sstevel@tonic-gate krb5_magic magic; 4067c478bd9Sstevel@tonic-gate krb5_cksumtype checksum_type; /* checksum type */ 4077c478bd9Sstevel@tonic-gate unsigned int length; 4087c478bd9Sstevel@tonic-gate krb5_octet *contents; 4097c478bd9Sstevel@tonic-gate } krb5_checksum; 4107c478bd9Sstevel@tonic-gate 4117c478bd9Sstevel@tonic-gate typedef struct _krb5_encrypt_block { 4127c478bd9Sstevel@tonic-gate krb5_magic magic; 4137c478bd9Sstevel@tonic-gate krb5_enctype crypto_entry; /* to call krb5_encrypt_size, you need 4147c478bd9Sstevel@tonic-gate this. it was a pointer, but it 4157c478bd9Sstevel@tonic-gate doesn't have to be. gross. */ 4167c478bd9Sstevel@tonic-gate krb5_keyblock *key; 4177c478bd9Sstevel@tonic-gate } krb5_encrypt_block; 4187c478bd9Sstevel@tonic-gate 4197c478bd9Sstevel@tonic-gate typedef struct _krb5_enc_data { 4207c478bd9Sstevel@tonic-gate krb5_magic magic; 4217c478bd9Sstevel@tonic-gate krb5_enctype enctype; 4227c478bd9Sstevel@tonic-gate krb5_kvno kvno; 4237c478bd9Sstevel@tonic-gate krb5_data ciphertext; 4247c478bd9Sstevel@tonic-gate } krb5_enc_data; 4257c478bd9Sstevel@tonic-gate 4267c478bd9Sstevel@tonic-gate /* per Kerberos v5 protocol spec */ 4277c478bd9Sstevel@tonic-gate #define ENCTYPE_NULL 0x0000 4287c478bd9Sstevel@tonic-gate #define ENCTYPE_DES_CBC_CRC 0x0001 /* DES cbc mode with CRC-32 */ 4297c478bd9Sstevel@tonic-gate #define ENCTYPE_DES_CBC_MD4 0x0002 /* DES cbc mode with RSA-MD4 */ 4307c478bd9Sstevel@tonic-gate #define ENCTYPE_DES_CBC_MD5 0x0003 /* DES cbc mode with RSA-MD5 */ 4317c478bd9Sstevel@tonic-gate #define ENCTYPE_DES_CBC_RAW 0x0004 /* DES cbc mode raw */ 4327c478bd9Sstevel@tonic-gate /* XXX deprecated? */ 4337c478bd9Sstevel@tonic-gate #define ENCTYPE_DES3_CBC_SHA 0x0005 /* DES-3 cbc mode with NIST-SHA */ 4347c478bd9Sstevel@tonic-gate #define ENCTYPE_DES3_CBC_RAW 0x0006 /* DES-3 cbc mode raw */ 4357c478bd9Sstevel@tonic-gate #define ENCTYPE_DES_HMAC_SHA1 0x0008 4367c478bd9Sstevel@tonic-gate #define ENCTYPE_DES3_CBC_SHA1 0x0010 4377c478bd9Sstevel@tonic-gate #define ENCTYPE_AES128_CTS_HMAC_SHA1_96 0x0011 4387c478bd9Sstevel@tonic-gate #define ENCTYPE_AES256_CTS_HMAC_SHA1_96 0x0012 4397c478bd9Sstevel@tonic-gate #define ENCTYPE_ARCFOUR_HMAC 0x0017 4407c478bd9Sstevel@tonic-gate #define ENCTYPE_ARCFOUR_HMAC_EXP 0x0018 4417c478bd9Sstevel@tonic-gate #define ENCTYPE_UNKNOWN 0x01ff 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate #define CKSUMTYPE_CRC32 0x0001 4447c478bd9Sstevel@tonic-gate #define CKSUMTYPE_RSA_MD4 0x0002 4457c478bd9Sstevel@tonic-gate #define CKSUMTYPE_RSA_MD4_DES 0x0003 4467c478bd9Sstevel@tonic-gate #define CKSUMTYPE_DESCBC 0x0004 4477c478bd9Sstevel@tonic-gate /* des-mac-k */ 4487c478bd9Sstevel@tonic-gate /* rsa-md4-des-k */ 4497c478bd9Sstevel@tonic-gate #define CKSUMTYPE_RSA_MD5 0x0007 4507c478bd9Sstevel@tonic-gate #define CKSUMTYPE_RSA_MD5_DES 0x0008 4517c478bd9Sstevel@tonic-gate #define CKSUMTYPE_NIST_SHA 0x0009 4527c478bd9Sstevel@tonic-gate #define CKSUMTYPE_HMAC_SHA1_DES3 0x000c 4537c478bd9Sstevel@tonic-gate #define CKSUMTYPE_HMAC_SHA1_96_AES128 0x000f 4547c478bd9Sstevel@tonic-gate #define CKSUMTYPE_HMAC_SHA1_96_AES256 0x0010 4557c478bd9Sstevel@tonic-gate #define CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /*Microsoft md5 hmac cksumtype*/ 4567c478bd9Sstevel@tonic-gate 457505d05c7Sgtb /* The following are entropy source designations. Whenever 458505d05c7Sgtb * krb5_C_random_add_entropy is called, one of these source ids is passed 459505d05c7Sgtb * in. This allows the library to better estimate bits of 460505d05c7Sgtb * entropy in the sample and to keep track of what sources of entropy have 461505d05c7Sgtb * contributed enough entropy. Sources marked internal MUST NOT be 462505d05c7Sgtb * used by applications outside the Kerberos library 463505d05c7Sgtb */ 464505d05c7Sgtb 465505d05c7Sgtb enum { 466505d05c7Sgtb KRB5_C_RANDSOURCE_OLDAPI = 0, /*calls to krb5_C_RANDOM_SEED (INTERNAL)*/ 467505d05c7Sgtb KRB5_C_RANDSOURCE_OSRAND = 1, /* /dev/random or equivalent (internal)*/ 468505d05c7Sgtb KRB5_C_RANDSOURCE_TRUSTEDPARTY = 2, /* From KDC or other trusted party*/ 469505d05c7Sgtb /*This source should be used carefully; data in this category 470505d05c7Sgtb * should be from a third party trusted to give random bits 471505d05c7Sgtb * For example keys issued by the KDC in the application server. 472505d05c7Sgtb */ 473505d05c7Sgtb KRB5_C_RANDSOURCE_TIMING = 3, /* Timing of operations*/ 474505d05c7Sgtb KRB5_C_RANDSOURCE_EXTERNAL_PROTOCOL = 4, /*Protocol data possibly from attacker*/ 475505d05c7Sgtb KRB5_C_RANDSOURCE_MAX = 5 /*Do not use; maximum source ID*/ 476505d05c7Sgtb }; 4777c478bd9Sstevel@tonic-gate 4787c478bd9Sstevel@tonic-gate #ifndef krb5_roundup 4797c478bd9Sstevel@tonic-gate /* round x up to nearest multiple of y */ 4807c478bd9Sstevel@tonic-gate #define krb5_roundup(x, y) ((((x) + (y) - 1)/(y))*(y)) 4817c478bd9Sstevel@tonic-gate #endif /* roundup */ 4827c478bd9Sstevel@tonic-gate 4837c478bd9Sstevel@tonic-gate /* macro function definitions to help clean up code */ 4847c478bd9Sstevel@tonic-gate 4857c478bd9Sstevel@tonic-gate #ifndef _KERNEL 4867c478bd9Sstevel@tonic-gate #define krb5_x(ptr,args) ((ptr)?((*(ptr)) args):(abort(),1)) 4877c478bd9Sstevel@tonic-gate #define krb5_xc(ptr,args) ((ptr)?((*(ptr)) args):(abort(),(char*)0)) 4887c478bd9Sstevel@tonic-gate #else 4897c478bd9Sstevel@tonic-gate #define krb5_x(ptr,args) ((*(ptr)) args) 4907c478bd9Sstevel@tonic-gate #define krb5_xc(ptr,args) ((*(ptr)) args) 4917c478bd9Sstevel@tonic-gate #endif 4927c478bd9Sstevel@tonic-gate 4937c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 4947c478bd9Sstevel@tonic-gate krb5_c_encrypt 495505d05c7Sgtb (krb5_context context, 496505d05c7Sgtb const krb5_keyblock *key, 497505d05c7Sgtb krb5_keyusage usage, const krb5_data *ivec, 498505d05c7Sgtb const krb5_data *input, krb5_enc_data *output); 4997c478bd9Sstevel@tonic-gate 5007c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5017c478bd9Sstevel@tonic-gate krb5_c_decrypt 502505d05c7Sgtb (krb5_context context, 503505d05c7Sgtb const krb5_keyblock *key, 504505d05c7Sgtb krb5_keyusage usage, const krb5_data *ivec, 505505d05c7Sgtb const krb5_enc_data *input, krb5_data *output); 5067c478bd9Sstevel@tonic-gate 5077c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5087c478bd9Sstevel@tonic-gate krb5_c_encrypt_length 509505d05c7Sgtb (krb5_context context, krb5_enctype enctype, 510505d05c7Sgtb size_t inputlen, size_t *length); 5117c478bd9Sstevel@tonic-gate 5127c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5137c478bd9Sstevel@tonic-gate krb5_c_block_size 514505d05c7Sgtb (krb5_context context, krb5_enctype enctype, 515505d05c7Sgtb size_t *blocksize); 5167c478bd9Sstevel@tonic-gate 5177c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5187c478bd9Sstevel@tonic-gate krb5_c_init_state(krb5_context, 5197c478bd9Sstevel@tonic-gate const krb5_keyblock *, krb5_keyusage, 5207c478bd9Sstevel@tonic-gate krb5_data *); 5217c478bd9Sstevel@tonic-gate 5227c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5237c478bd9Sstevel@tonic-gate krb5_c_free_state(krb5_context, 5247c478bd9Sstevel@tonic-gate const krb5_keyblock *, krb5_data *); 5257c478bd9Sstevel@tonic-gate 5267c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5277c478bd9Sstevel@tonic-gate krb5_c_make_random_key 528505d05c7Sgtb (krb5_context context, krb5_enctype enctype, 529505d05c7Sgtb krb5_keyblock *random_key); 530505d05c7Sgtb 531505d05c7Sgtb /* Register a new entropy sample with the PRNG. may cause 532505d05c7Sgtb * the PRNG to be reseeded, although this is not guaranteed. See previous randsource definitions 533505d05c7Sgtb * for information on how each source should be used. 534505d05c7Sgtb */ 535505d05c7Sgtb krb5_error_code KRB5_CALLCONV 536505d05c7Sgtb krb5_c_random_add_entropy 537505d05c7Sgtb (krb5_context context, unsigned int randsource_id, const krb5_data *data); 5387c478bd9Sstevel@tonic-gate 5397c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5407c478bd9Sstevel@tonic-gate krb5_c_random_make_octets 541505d05c7Sgtb (krb5_context context, krb5_data *data); 542505d05c7Sgtb 543505d05c7Sgtb /* 544505d05c7Sgtb * Collect entropy from the OS if possible. strong requests that as strong 545505d05c7Sgtb * of a source of entropy as available be used. Setting strong may 546505d05c7Sgtb * increase the probability of blocking and should not be used for normal 547505d05c7Sgtb * applications. Good uses include seeding the PRNG for kadmind 548505d05c7Sgtb * and realm setup. 549505d05c7Sgtb * If successful is non-null, then successful is set to 1 if the OS provided 550505d05c7Sgtb * entropy else zero. 551505d05c7Sgtb */ 552505d05c7Sgtb #if 0 /* SUNW14resync - not used in Solaris */ 553505d05c7Sgtb krb5_error_code KRB5_CALLCONV 554505d05c7Sgtb krb5_c_random_os_entropy 555505d05c7Sgtb (krb5_context context, int strong, int *success); 556505d05c7Sgtb #endif 5577c478bd9Sstevel@tonic-gate 558505d05c7Sgtb /*deprecated*/ krb5_error_code KRB5_CALLCONV 5597c478bd9Sstevel@tonic-gate krb5_c_random_seed 560505d05c7Sgtb (krb5_context context, krb5_data *data); 5617c478bd9Sstevel@tonic-gate 5627c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5637c478bd9Sstevel@tonic-gate krb5_c_string_to_key 564505d05c7Sgtb (krb5_context context, krb5_enctype enctype, 565505d05c7Sgtb const krb5_data *string, const krb5_data *salt, 566505d05c7Sgtb krb5_keyblock *key); 5677c478bd9Sstevel@tonic-gate 5687c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5697c478bd9Sstevel@tonic-gate krb5_c_string_to_key_with_params(krb5_context context, 5707c478bd9Sstevel@tonic-gate krb5_enctype enctype, 5717c478bd9Sstevel@tonic-gate const krb5_data *string, 5727c478bd9Sstevel@tonic-gate const krb5_data *salt, 5737c478bd9Sstevel@tonic-gate const krb5_data *params, 5747c478bd9Sstevel@tonic-gate krb5_keyblock *key); 5757c478bd9Sstevel@tonic-gate 5767c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5777c478bd9Sstevel@tonic-gate krb5_c_enctype_compare 578505d05c7Sgtb (krb5_context context, krb5_enctype e1, krb5_enctype e2, 579505d05c7Sgtb krb5_boolean *similar); 5807c478bd9Sstevel@tonic-gate 5817c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5827c478bd9Sstevel@tonic-gate krb5_c_make_checksum 583505d05c7Sgtb (krb5_context context, krb5_cksumtype cksumtype, 584505d05c7Sgtb const krb5_keyblock *key, krb5_keyusage usage, 585505d05c7Sgtb const krb5_data *input, krb5_checksum *cksum); 5867c478bd9Sstevel@tonic-gate 5877c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5887c478bd9Sstevel@tonic-gate krb5_c_verify_checksum 589505d05c7Sgtb (krb5_context context, 590505d05c7Sgtb const krb5_keyblock *key, krb5_keyusage usage, 591505d05c7Sgtb const krb5_data *data, 592505d05c7Sgtb const krb5_checksum *cksum, 593505d05c7Sgtb krb5_boolean *valid); 5947c478bd9Sstevel@tonic-gate 5957c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 5967c478bd9Sstevel@tonic-gate krb5_c_checksum_length 597505d05c7Sgtb (krb5_context context, krb5_cksumtype cksumtype, 598505d05c7Sgtb size_t *length); 5997c478bd9Sstevel@tonic-gate 6007c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 6017c478bd9Sstevel@tonic-gate krb5_c_keyed_checksum_types 602505d05c7Sgtb (krb5_context context, krb5_enctype enctype, 603505d05c7Sgtb unsigned int *count, krb5_cksumtype **cksumtypes); 6047c478bd9Sstevel@tonic-gate 6057c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AS_REQ_PA_ENC_TS 1 6067c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_KDC_REP_TICKET 2 6077c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AS_REP_ENCPART 3 6087c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY 4 6097c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_TGS_REQ_AD_SUBKEY 5 6107c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM 6 6117c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_TGS_REQ_AUTH 7 6127c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SESSKEY 8 6137c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SUBKEY 9 6147c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM 10 6157c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AP_REQ_AUTH 11 6167c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AP_REP_ENCPART 12 6177c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_KRB_PRIV_ENCPART 13 6187c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_KRB_CRED_ENCPART 14 6197c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_KRB_SAFE_CKSUM 15 6207c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_APP_DATA_ENCRYPT 16 6217c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_APP_DATA_CKSUM 17 6227c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_KRB_ERROR_CKSUM 18 6237c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AD_KDCISSUED_CKSUM 19 6247c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AD_MTE 20 6257c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_AD_ITE 21 6267c478bd9Sstevel@tonic-gate 6277c478bd9Sstevel@tonic-gate /* XXX need to register these */ 6287c478bd9Sstevel@tonic-gate 6297c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_GSS_TOK_MIC 22 6307c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_GSS_TOK_WRAP_INTEG 23 6317c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_GSS_TOK_WRAP_PRIV 24 6327c478bd9Sstevel@tonic-gate 6337c478bd9Sstevel@tonic-gate /* Defined in hardware preauth draft */ 6347c478bd9Sstevel@tonic-gate 6357c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_CKSUM 25 6367c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID 26 6377c478bd9Sstevel@tonic-gate #define KRB5_KEYUSAGE_PA_SAM_RESPONSE 27 6387c478bd9Sstevel@tonic-gate 6397c478bd9Sstevel@tonic-gate krb5_boolean KRB5_CALLCONV krb5_c_valid_enctype 640505d05c7Sgtb (krb5_enctype ktype); 6417c478bd9Sstevel@tonic-gate krb5_boolean KRB5_CALLCONV krb5_c_valid_cksumtype 642505d05c7Sgtb (krb5_cksumtype ctype); 6437c478bd9Sstevel@tonic-gate krb5_boolean KRB5_CALLCONV krb5_c_is_coll_proof_cksum 644505d05c7Sgtb (krb5_cksumtype ctype); 6457c478bd9Sstevel@tonic-gate krb5_boolean KRB5_CALLCONV krb5_c_is_keyed_cksum 646505d05c7Sgtb (krb5_cksumtype ctype); 647505d05c7Sgtb 648505d05c7Sgtb 649505d05c7Sgtb #if KRB5_PRIVATE 650505d05c7Sgtb /* Use the above four instead. */ 651505d05c7Sgtb krb5_boolean KRB5_CALLCONV valid_enctype 652505d05c7Sgtb (krb5_enctype ktype); 653505d05c7Sgtb krb5_boolean KRB5_CALLCONV valid_cksumtype 654505d05c7Sgtb (krb5_cksumtype ctype); 655505d05c7Sgtb krb5_boolean KRB5_CALLCONV is_coll_proof_cksum 656505d05c7Sgtb (krb5_cksumtype ctype); 657505d05c7Sgtb krb5_boolean KRB5_CALLCONV is_keyed_cksum 658505d05c7Sgtb (krb5_cksumtype ctype); 659505d05c7Sgtb #endif 6607c478bd9Sstevel@tonic-gate 661*10db1377Sgtb 662*10db1377Sgtb #ifdef KRB5_OLD_CRYPTO 663*10db1377Sgtb /* 664*10db1377Sgtb * old cryptosystem routine prototypes. These are now layered 665*10db1377Sgtb * on top of the functions above. 666*10db1377Sgtb */ 667*10db1377Sgtb krb5_error_code KRB5_CALLCONV krb5_use_enctype 668*10db1377Sgtb (krb5_context context, 669*10db1377Sgtb krb5_encrypt_block * eblock, 670*10db1377Sgtb krb5_enctype enctype); 671*10db1377Sgtb 672*10db1377Sgtb krb5_error_code KRB5_CALLCONV krb5_string_to_key 673*10db1377Sgtb (krb5_context context, 674*10db1377Sgtb const krb5_encrypt_block * eblock, 675*10db1377Sgtb krb5_keyblock * keyblock, 676*10db1377Sgtb const krb5_data * data, 677*10db1377Sgtb const krb5_data * salt); 678*10db1377Sgtb 679*10db1377Sgtb size_t KRB5_CALLCONV krb5_checksum_size 680*10db1377Sgtb (krb5_context context, 681*10db1377Sgtb krb5_cksumtype ctype); 682*10db1377Sgtb #endif /* KRB5_OLD_CRYPTO */ 6837c478bd9Sstevel@tonic-gate 6847c478bd9Sstevel@tonic-gate /* 6857c478bd9Sstevel@tonic-gate * end "encryption.h" 6867c478bd9Sstevel@tonic-gate */ 6877c478bd9Sstevel@tonic-gate 6887c478bd9Sstevel@tonic-gate /* 6897c478bd9Sstevel@tonic-gate * begin "fieldbits.h" 6907c478bd9Sstevel@tonic-gate */ 6917c478bd9Sstevel@tonic-gate 6927c478bd9Sstevel@tonic-gate /* kdc_options for kdc_request */ 6937c478bd9Sstevel@tonic-gate /* options is 32 bits; each host is responsible to put the 4 bytes 6947c478bd9Sstevel@tonic-gate representing these bits into net order before transmission */ 6957c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x80000000 */ 6967c478bd9Sstevel@tonic-gate #define KDC_OPT_FORWARDABLE 0x40000000 6977c478bd9Sstevel@tonic-gate #define KDC_OPT_FORWARDED 0x20000000 6987c478bd9Sstevel@tonic-gate #define KDC_OPT_PROXIABLE 0x10000000 6997c478bd9Sstevel@tonic-gate #define KDC_OPT_PROXY 0x08000000 7007c478bd9Sstevel@tonic-gate #define KDC_OPT_ALLOW_POSTDATE 0x04000000 7017c478bd9Sstevel@tonic-gate #define KDC_OPT_POSTDATED 0x02000000 7027c478bd9Sstevel@tonic-gate /* #define KDC_OPT_UNUSED 0x01000000 */ 7037c478bd9Sstevel@tonic-gate #define KDC_OPT_RENEWABLE 0x00800000 7047c478bd9Sstevel@tonic-gate /* #define KDC_OPT_UNUSED 0x00400000 */ 7057c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00200000 */ 7067c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00100000 */ 7077c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00080000 */ 7087c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00040000 */ 7097c478bd9Sstevel@tonic-gate #define KDC_OPT_REQUEST_ANONYMOUS 0x00020000 7107c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00010000 */ 7117c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00008000 */ 7127c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00004000 */ 7137c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00002000 */ 7147c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00001000 */ 7157c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00000800 */ 7167c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00000400 */ 7177c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00000200 */ 7187c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00000100 */ 7197c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00000080 */ 7207c478bd9Sstevel@tonic-gate /* #define KDC_OPT_RESERVED 0x00000040 */ 7217c478bd9Sstevel@tonic-gate #define KDC_OPT_DISABLE_TRANSITED_CHECK 0x00000020 7227c478bd9Sstevel@tonic-gate #define KDC_OPT_RENEWABLE_OK 0x00000010 7237c478bd9Sstevel@tonic-gate #define KDC_OPT_ENC_TKT_IN_SKEY 0x00000008 7247c478bd9Sstevel@tonic-gate /* #define KDC_OPT_UNUSED 0x00000004 */ 7257c478bd9Sstevel@tonic-gate #define KDC_OPT_RENEW 0x00000002 7267c478bd9Sstevel@tonic-gate #define KDC_OPT_VALIDATE 0x00000001 7277c478bd9Sstevel@tonic-gate 7287c478bd9Sstevel@tonic-gate /* 7297c478bd9Sstevel@tonic-gate * Mask of ticket flags in the TGT which should be converted into KDC 7307c478bd9Sstevel@tonic-gate * options when using the TGT to get derivitive tickets. 7317c478bd9Sstevel@tonic-gate * 7327c478bd9Sstevel@tonic-gate * New mask = KDC_OPT_FORWARDABLE | KDC_OPT_PROXIABLE | 7337c478bd9Sstevel@tonic-gate * KDC_OPT_ALLOW_POSTDATE | KDC_OPT_RENEWABLE 7347c478bd9Sstevel@tonic-gate */ 7357c478bd9Sstevel@tonic-gate #define KDC_TKT_COMMON_MASK 0x54800000 7367c478bd9Sstevel@tonic-gate 7377c478bd9Sstevel@tonic-gate /* definitions for ap_options fields */ 7387c478bd9Sstevel@tonic-gate /* ap_options are 32 bits; each host is responsible to put the 4 bytes 7397c478bd9Sstevel@tonic-gate representing these bits into net order before transmission */ 7407c478bd9Sstevel@tonic-gate #define AP_OPTS_RESERVED 0x80000000 7417c478bd9Sstevel@tonic-gate #define AP_OPTS_USE_SESSION_KEY 0x40000000 7427c478bd9Sstevel@tonic-gate #define AP_OPTS_MUTUAL_REQUIRED 0x20000000 7437c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x10000000 */ 7447c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x08000000 */ 7457c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x04000000 */ 7467c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x02000000 */ 7477c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x01000000 */ 7487c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00800000 */ 7497c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00400000 */ 7507c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00200000 */ 7517c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00100000 */ 7527c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00080000 */ 7537c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00040000 */ 7547c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00020000 */ 7557c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00010000 */ 7567c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00008000 */ 7577c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00004000 */ 7587c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00002000 */ 7597c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00001000 */ 7607c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000800 */ 7617c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000400 */ 7627c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000200 */ 7637c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000100 */ 7647c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000080 */ 7657c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000040 */ 7667c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000020 */ 7677c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000010 */ 7687c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000008 */ 7697c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000004 */ 7707c478bd9Sstevel@tonic-gate /* #define AP_OPTS_RESERVED 0x00000002 */ 7717c478bd9Sstevel@tonic-gate #define AP_OPTS_USE_SUBKEY 0x00000001 7727c478bd9Sstevel@tonic-gate 7737c478bd9Sstevel@tonic-gate #define AP_OPTS_WIRE_MASK 0xfffffff0 7747c478bd9Sstevel@tonic-gate 7757c478bd9Sstevel@tonic-gate /* definitions for ad_type fields. */ 7767c478bd9Sstevel@tonic-gate #define AD_TYPE_RESERVED 0x8000 7777c478bd9Sstevel@tonic-gate #define AD_TYPE_EXTERNAL 0x4000 7787c478bd9Sstevel@tonic-gate #define AD_TYPE_REGISTERED 0x2000 7797c478bd9Sstevel@tonic-gate 7807c478bd9Sstevel@tonic-gate #define AD_TYPE_FIELD_TYPE_MASK 0x1fff 7817c478bd9Sstevel@tonic-gate 7827c478bd9Sstevel@tonic-gate /* Ticket flags */ 7837c478bd9Sstevel@tonic-gate /* flags are 32 bits; each host is responsible to put the 4 bytes 7847c478bd9Sstevel@tonic-gate representing these bits into net order before transmission */ 7857c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x80000000 */ 7867c478bd9Sstevel@tonic-gate #define TKT_FLG_FORWARDABLE 0x40000000 7877c478bd9Sstevel@tonic-gate #define TKT_FLG_FORWARDED 0x20000000 7887c478bd9Sstevel@tonic-gate #define TKT_FLG_PROXIABLE 0x10000000 7897c478bd9Sstevel@tonic-gate #define TKT_FLG_PROXY 0x08000000 7907c478bd9Sstevel@tonic-gate #define TKT_FLG_MAY_POSTDATE 0x04000000 7917c478bd9Sstevel@tonic-gate #define TKT_FLG_POSTDATED 0x02000000 7927c478bd9Sstevel@tonic-gate #define TKT_FLG_INVALID 0x01000000 7937c478bd9Sstevel@tonic-gate #define TKT_FLG_RENEWABLE 0x00800000 7947c478bd9Sstevel@tonic-gate #define TKT_FLG_INITIAL 0x00400000 7957c478bd9Sstevel@tonic-gate #define TKT_FLG_PRE_AUTH 0x00200000 7967c478bd9Sstevel@tonic-gate #define TKT_FLG_HW_AUTH 0x00100000 7977c478bd9Sstevel@tonic-gate #define TKT_FLG_TRANSIT_POLICY_CHECKED 0x00080000 7987c478bd9Sstevel@tonic-gate #define TKT_FLG_OK_AS_DELEGATE 0x00040000 7997c478bd9Sstevel@tonic-gate #define TKT_FLG_ANONYMOUS 0x00020000 8007c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00010000 */ 8017c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00008000 */ 8027c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00004000 */ 8037c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00002000 */ 8047c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00001000 */ 8057c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000800 */ 8067c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000400 */ 8077c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000200 */ 8087c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000100 */ 8097c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000080 */ 8107c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000040 */ 8117c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000020 */ 8127c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000010 */ 8137c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000008 */ 8147c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000004 */ 8157c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000002 */ 8167c478bd9Sstevel@tonic-gate /* #define TKT_FLG_RESERVED 0x00000001 */ 8177c478bd9Sstevel@tonic-gate 8187c478bd9Sstevel@tonic-gate /* definitions for lr_type fields. */ 8197c478bd9Sstevel@tonic-gate #define LR_TYPE_THIS_SERVER_ONLY 0x8000 8207c478bd9Sstevel@tonic-gate 8217c478bd9Sstevel@tonic-gate #define LR_TYPE_INTERPRETATION_MASK 0x7fff 8227c478bd9Sstevel@tonic-gate 8237c478bd9Sstevel@tonic-gate /* definitions for ad_type fields. */ 8247c478bd9Sstevel@tonic-gate #define AD_TYPE_EXTERNAL 0x4000 8257c478bd9Sstevel@tonic-gate #define AD_TYPE_REGISTERED 0x2000 8267c478bd9Sstevel@tonic-gate 8277c478bd9Sstevel@tonic-gate #define AD_TYPE_FIELD_TYPE_MASK 0x1fff 8287c478bd9Sstevel@tonic-gate #define AD_TYPE_INTERNAL_MASK 0x3fff 8297c478bd9Sstevel@tonic-gate 8307c478bd9Sstevel@tonic-gate /* definitions for msec direction bit for KRB_SAFE, KRB_PRIV */ 8317c478bd9Sstevel@tonic-gate #define MSEC_DIRBIT 0x8000 8327c478bd9Sstevel@tonic-gate #define MSEC_VAL_MASK 0x7fff 8337c478bd9Sstevel@tonic-gate 8347c478bd9Sstevel@tonic-gate /* 8357c478bd9Sstevel@tonic-gate * end "fieldbits.h" 8367c478bd9Sstevel@tonic-gate */ 8377c478bd9Sstevel@tonic-gate 8387c478bd9Sstevel@tonic-gate /* 8397c478bd9Sstevel@tonic-gate * begin "proto.h" 8407c478bd9Sstevel@tonic-gate */ 8417c478bd9Sstevel@tonic-gate 8427c478bd9Sstevel@tonic-gate /* Protocol version number */ 8437c478bd9Sstevel@tonic-gate #define KRB5_PVNO 5 8447c478bd9Sstevel@tonic-gate 8457c478bd9Sstevel@tonic-gate /* Message types */ 8467c478bd9Sstevel@tonic-gate 8477c478bd9Sstevel@tonic-gate #define KRB5_AS_REQ ((krb5_msgtype)10) /* Req for initial authentication */ 8487c478bd9Sstevel@tonic-gate #define KRB5_AS_REP ((krb5_msgtype)11) /* Response to KRB_AS_REQ request */ 8497c478bd9Sstevel@tonic-gate #define KRB5_TGS_REQ ((krb5_msgtype)12) /* TGS request to server */ 8507c478bd9Sstevel@tonic-gate #define KRB5_TGS_REP ((krb5_msgtype)13) /* Response to KRB_TGS_REQ req */ 8517c478bd9Sstevel@tonic-gate #define KRB5_AP_REQ ((krb5_msgtype)14) /* application request to server */ 8527c478bd9Sstevel@tonic-gate #define KRB5_AP_REP ((krb5_msgtype)15) /* Response to KRB_AP_REQ_MUTUAL */ 8537c478bd9Sstevel@tonic-gate #define KRB5_SAFE ((krb5_msgtype)20) /* Safe application message */ 8547c478bd9Sstevel@tonic-gate #define KRB5_PRIV ((krb5_msgtype)21) /* Private application message */ 8557c478bd9Sstevel@tonic-gate #define KRB5_CRED ((krb5_msgtype)22) /* Credential forwarding message */ 8567c478bd9Sstevel@tonic-gate #define KRB5_ERROR ((krb5_msgtype)30) /* Error response */ 8577c478bd9Sstevel@tonic-gate 8587c478bd9Sstevel@tonic-gate /* LastReq types */ 8597c478bd9Sstevel@tonic-gate #define KRB5_LRQ_NONE 0 8607c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ALL_LAST_TGT 1 8617c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ONE_LAST_TGT (-1) 8627c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ALL_LAST_INITIAL 2 8637c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ONE_LAST_INITIAL (-2) 8647c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ALL_LAST_TGT_ISSUED 3 8657c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ONE_LAST_TGT_ISSUED (-3) 8667c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ALL_LAST_RENEWAL 4 8677c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ONE_LAST_RENEWAL (-4) 8687c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ALL_LAST_REQ 5 8697c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ONE_LAST_REQ (-5) 8707c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ALL_PW_EXPTIME 6 8717c478bd9Sstevel@tonic-gate #define KRB5_LRQ_ONE_PW_EXPTIME (-6) 8727c478bd9Sstevel@tonic-gate 8737c478bd9Sstevel@tonic-gate 8747c478bd9Sstevel@tonic-gate /* PADATA types */ 8757c478bd9Sstevel@tonic-gate #define KRB5_PADATA_NONE 0 8767c478bd9Sstevel@tonic-gate #define KRB5_PADATA_AP_REQ 1 8777c478bd9Sstevel@tonic-gate #define KRB5_PADATA_TGS_REQ KRB5_PADATA_AP_REQ 8787c478bd9Sstevel@tonic-gate #define KRB5_PADATA_ENC_TIMESTAMP 2 8797c478bd9Sstevel@tonic-gate #define KRB5_PADATA_PW_SALT 3 8807c478bd9Sstevel@tonic-gate #if 0 /* Not used */ 8817c478bd9Sstevel@tonic-gate #define KRB5_PADATA_ENC_ENCKEY 4 /* Key encrypted within itself */ 8827c478bd9Sstevel@tonic-gate #endif 8837c478bd9Sstevel@tonic-gate #define KRB5_PADATA_ENC_UNIX_TIME 5 /* timestamp encrypted in key */ 8847c478bd9Sstevel@tonic-gate #define KRB5_PADATA_ENC_SANDIA_SECURID 6 /* SecurId passcode */ 8857c478bd9Sstevel@tonic-gate #define KRB5_PADATA_SESAME 7 /* Sesame project */ 8867c478bd9Sstevel@tonic-gate #define KRB5_PADATA_OSF_DCE 8 /* OSF DCE */ 8877c478bd9Sstevel@tonic-gate #define KRB5_CYBERSAFE_SECUREID 9 /* Cybersafe */ 8887c478bd9Sstevel@tonic-gate #define KRB5_PADATA_AFS3_SALT 10 /* Cygnus */ 8897c478bd9Sstevel@tonic-gate #define KRB5_PADATA_ETYPE_INFO 11 /* Etype info for preauth */ 8907c478bd9Sstevel@tonic-gate #define KRB5_PADATA_SAM_CHALLENGE 12 /* draft challenge system */ 8917c478bd9Sstevel@tonic-gate #define KRB5_PADATA_SAM_RESPONSE 13 /* draft challenge system response */ 8927c478bd9Sstevel@tonic-gate #define KRB5_PADATA_PK_AS_REQ 14 /* PKINIT */ 8937c478bd9Sstevel@tonic-gate #define KRB5_PADATA_PK_AS_REP 15 /* PKINIT */ 8947c478bd9Sstevel@tonic-gate #define KRB5_PADATA_ETYPE_INFO2 19 8957c478bd9Sstevel@tonic-gate #define KRB5_PADATA_SAM_CHALLENGE_2 30 /* draft challenge system, updated */ 8967c478bd9Sstevel@tonic-gate #define KRB5_PADATA_SAM_RESPONSE_2 31 /* draft challenge system, updated */ 8977c478bd9Sstevel@tonic-gate 8987c478bd9Sstevel@tonic-gate #define KRB5_SAM_USE_SAD_AS_KEY 0x80000000 8997c478bd9Sstevel@tonic-gate #define KRB5_SAM_SEND_ENCRYPTED_SAD 0x40000000 9007c478bd9Sstevel@tonic-gate #define KRB5_SAM_MUST_PK_ENCRYPT_SAD 0x20000000 /* currently must be zero */ 9017c478bd9Sstevel@tonic-gate 9027c478bd9Sstevel@tonic-gate /* Reserved for SPX pre-authentication. */ 9037c478bd9Sstevel@tonic-gate #define KRB5_PADATA_DASS 16 9047c478bd9Sstevel@tonic-gate 9057c478bd9Sstevel@tonic-gate /* Transited encoding types */ 9067c478bd9Sstevel@tonic-gate #define KRB5_DOMAIN_X500_COMPRESS 1 9077c478bd9Sstevel@tonic-gate 9087c478bd9Sstevel@tonic-gate /* alternate authentication types */ 9097c478bd9Sstevel@tonic-gate #define KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE 64 9107c478bd9Sstevel@tonic-gate 9117c478bd9Sstevel@tonic-gate /* authorization data types */ 9127c478bd9Sstevel@tonic-gate #define KRB5_AUTHDATA_OSF_DCE 64 9137c478bd9Sstevel@tonic-gate #define KRB5_AUTHDATA_SESAME 65 9147c478bd9Sstevel@tonic-gate 9157c478bd9Sstevel@tonic-gate /* password change constants */ 9167c478bd9Sstevel@tonic-gate 9177c478bd9Sstevel@tonic-gate #define KRB5_KPASSWD_SUCCESS 0 9187c478bd9Sstevel@tonic-gate #define KRB5_KPASSWD_MALFORMED 1 9197c478bd9Sstevel@tonic-gate #define KRB5_KPASSWD_HARDERROR 2 9207c478bd9Sstevel@tonic-gate #define KRB5_KPASSWD_AUTHERROR 3 9217c478bd9Sstevel@tonic-gate #define KRB5_KPASSWD_SOFTERROR 4 922505d05c7Sgtb /* These are Microsoft's extensions in RFC 3244, and it looks like 923505d05c7Sgtb they'll become standardized, possibly with other additions. */ 924505d05c7Sgtb #define KRB5_KPASSWD_ACCESSDENIED 5 /* unused */ 925505d05c7Sgtb #define KRB5_KPASSWD_BAD_VERSION 6 926505d05c7Sgtb #define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7 /* unused */ 9277c478bd9Sstevel@tonic-gate 9287c478bd9Sstevel@tonic-gate /* 9297c478bd9Sstevel@tonic-gate * end "proto.h" 9307c478bd9Sstevel@tonic-gate */ 9317c478bd9Sstevel@tonic-gate 9327c478bd9Sstevel@tonic-gate /* Time set */ 9337c478bd9Sstevel@tonic-gate typedef struct _krb5_ticket_times { 9347c478bd9Sstevel@tonic-gate krb5_timestamp authtime; /* XXX ? should ktime in KDC_REP == authtime 9357c478bd9Sstevel@tonic-gate in ticket? otherwise client can't get this */ 9367c478bd9Sstevel@tonic-gate krb5_timestamp starttime; /* optional in ticket, if not present, 9377c478bd9Sstevel@tonic-gate use authtime */ 9387c478bd9Sstevel@tonic-gate krb5_timestamp endtime; 9397c478bd9Sstevel@tonic-gate krb5_timestamp renew_till; 9407c478bd9Sstevel@tonic-gate } krb5_ticket_times; 9417c478bd9Sstevel@tonic-gate 9427c478bd9Sstevel@tonic-gate /* structure for auth data */ 9437c478bd9Sstevel@tonic-gate typedef struct _krb5_authdata { 9447c478bd9Sstevel@tonic-gate krb5_magic magic; 9457c478bd9Sstevel@tonic-gate krb5_authdatatype ad_type; 9467c478bd9Sstevel@tonic-gate unsigned int length; 9477c478bd9Sstevel@tonic-gate krb5_octet *contents; 9487c478bd9Sstevel@tonic-gate } krb5_authdata; 9497c478bd9Sstevel@tonic-gate 9507c478bd9Sstevel@tonic-gate /* structure for transited encoding */ 9517c478bd9Sstevel@tonic-gate typedef struct _krb5_transited { 9527c478bd9Sstevel@tonic-gate krb5_magic magic; 9537c478bd9Sstevel@tonic-gate krb5_octet tr_type; 9547c478bd9Sstevel@tonic-gate krb5_data tr_contents; 9557c478bd9Sstevel@tonic-gate } krb5_transited; 9567c478bd9Sstevel@tonic-gate 9577c478bd9Sstevel@tonic-gate typedef struct _krb5_enc_tkt_part { 9587c478bd9Sstevel@tonic-gate krb5_magic magic; 9597c478bd9Sstevel@tonic-gate /* to-be-encrypted portion */ 9607c478bd9Sstevel@tonic-gate krb5_flags flags; /* flags */ 9617c478bd9Sstevel@tonic-gate krb5_keyblock *session; /* session key: includes enctype */ 9627c478bd9Sstevel@tonic-gate krb5_principal client; /* client name/realm */ 9637c478bd9Sstevel@tonic-gate krb5_transited transited; /* list of transited realms */ 9647c478bd9Sstevel@tonic-gate krb5_ticket_times times; /* auth, start, end, renew_till */ 9657c478bd9Sstevel@tonic-gate krb5_address * *caddrs; /* array of ptrs to addresses */ 9667c478bd9Sstevel@tonic-gate krb5_authdata * *authorization_data; /* auth data */ 9677c478bd9Sstevel@tonic-gate } krb5_enc_tkt_part; 9687c478bd9Sstevel@tonic-gate 9697c478bd9Sstevel@tonic-gate typedef struct _krb5_ticket { 9707c478bd9Sstevel@tonic-gate krb5_magic magic; 9717c478bd9Sstevel@tonic-gate /* cleartext portion */ 9727c478bd9Sstevel@tonic-gate krb5_principal server; /* server name/realm */ 9737c478bd9Sstevel@tonic-gate krb5_enc_data enc_part; /* encryption type, kvno, encrypted 9747c478bd9Sstevel@tonic-gate encoding */ 9757c478bd9Sstevel@tonic-gate krb5_enc_tkt_part *enc_part2; /* ptr to decrypted version, if 9767c478bd9Sstevel@tonic-gate available */ 9777c478bd9Sstevel@tonic-gate } krb5_ticket; 9787c478bd9Sstevel@tonic-gate 9797c478bd9Sstevel@tonic-gate /* the unencrypted version */ 9807c478bd9Sstevel@tonic-gate typedef struct _krb5_authenticator { 9817c478bd9Sstevel@tonic-gate krb5_magic magic; 9827c478bd9Sstevel@tonic-gate krb5_principal client; /* client name/realm */ 9837c478bd9Sstevel@tonic-gate krb5_checksum *checksum; /* checksum, includes type, optional */ 9847c478bd9Sstevel@tonic-gate krb5_int32 cusec; /* client usec portion */ 9857c478bd9Sstevel@tonic-gate krb5_timestamp ctime; /* client sec portion */ 9867c478bd9Sstevel@tonic-gate krb5_keyblock *subkey; /* true session key, optional */ 9877c478bd9Sstevel@tonic-gate krb5_ui_4 seq_number; /* sequence #, optional */ 9887c478bd9Sstevel@tonic-gate krb5_authdata * *authorization_data; /* New add by Ari, auth data */ 9897c478bd9Sstevel@tonic-gate } krb5_authenticator; 9907c478bd9Sstevel@tonic-gate 9917c478bd9Sstevel@tonic-gate typedef struct _krb5_tkt_authent { 9927c478bd9Sstevel@tonic-gate krb5_magic magic; 9937c478bd9Sstevel@tonic-gate krb5_ticket *ticket; 9947c478bd9Sstevel@tonic-gate krb5_authenticator *authenticator; 9957c478bd9Sstevel@tonic-gate krb5_flags ap_options; 9967c478bd9Sstevel@tonic-gate } krb5_tkt_authent; 9977c478bd9Sstevel@tonic-gate 9987c478bd9Sstevel@tonic-gate /* credentials: Ticket, session key, etc. */ 9997c478bd9Sstevel@tonic-gate typedef struct _krb5_creds { 10007c478bd9Sstevel@tonic-gate krb5_magic magic; 10017c478bd9Sstevel@tonic-gate krb5_principal client; /* client's principal identifier */ 10027c478bd9Sstevel@tonic-gate krb5_principal server; /* server's principal identifier */ 10037c478bd9Sstevel@tonic-gate krb5_keyblock keyblock; /* session encryption key info */ 10047c478bd9Sstevel@tonic-gate krb5_ticket_times times; /* lifetime info */ 10057c478bd9Sstevel@tonic-gate krb5_boolean is_skey; /* true if ticket is encrypted in 10067c478bd9Sstevel@tonic-gate another ticket's skey */ 10077c478bd9Sstevel@tonic-gate krb5_flags ticket_flags; /* flags in ticket */ 10087c478bd9Sstevel@tonic-gate krb5_address * *addresses; /* addrs in ticket */ 10097c478bd9Sstevel@tonic-gate krb5_data ticket; /* ticket string itself */ 10107c478bd9Sstevel@tonic-gate krb5_data second_ticket; /* second ticket, if related to 10117c478bd9Sstevel@tonic-gate ticket (via DUPLICATE-SKEY or 10127c478bd9Sstevel@tonic-gate ENC-TKT-IN-SKEY) */ 10137c478bd9Sstevel@tonic-gate krb5_authdata * *authdata; /* authorization data */ 10147c478bd9Sstevel@tonic-gate } krb5_creds; 10157c478bd9Sstevel@tonic-gate 10167c478bd9Sstevel@tonic-gate /* Last request fields */ 10177c478bd9Sstevel@tonic-gate typedef struct _krb5_last_req_entry { 10187c478bd9Sstevel@tonic-gate krb5_magic magic; 10197c478bd9Sstevel@tonic-gate krb5_int32 lr_type; 10207c478bd9Sstevel@tonic-gate krb5_timestamp value; 10217c478bd9Sstevel@tonic-gate } krb5_last_req_entry; 10227c478bd9Sstevel@tonic-gate 10237c478bd9Sstevel@tonic-gate /* pre-authentication data */ 10247c478bd9Sstevel@tonic-gate typedef struct _krb5_pa_data { 10257c478bd9Sstevel@tonic-gate krb5_magic magic; 10267c478bd9Sstevel@tonic-gate krb5_preauthtype pa_type; 10277c478bd9Sstevel@tonic-gate unsigned int length; 10287c478bd9Sstevel@tonic-gate krb5_octet *contents; 10297c478bd9Sstevel@tonic-gate } krb5_pa_data; 10307c478bd9Sstevel@tonic-gate 10317c478bd9Sstevel@tonic-gate typedef struct _krb5_kdc_req { 10327c478bd9Sstevel@tonic-gate krb5_magic magic; 10337c478bd9Sstevel@tonic-gate krb5_msgtype msg_type; /* AS_REQ or TGS_REQ? */ 10347c478bd9Sstevel@tonic-gate krb5_pa_data * *padata; /* e.g. encoded AP_REQ */ 10357c478bd9Sstevel@tonic-gate /* real body */ 10367c478bd9Sstevel@tonic-gate krb5_flags kdc_options; /* requested options */ 10377c478bd9Sstevel@tonic-gate krb5_principal client; /* includes realm; optional */ 10387c478bd9Sstevel@tonic-gate krb5_principal server; /* includes realm (only used if no 10397c478bd9Sstevel@tonic-gate client) */ 10407c478bd9Sstevel@tonic-gate krb5_timestamp from; /* requested starttime */ 10417c478bd9Sstevel@tonic-gate krb5_timestamp till; /* requested endtime */ 10427c478bd9Sstevel@tonic-gate krb5_timestamp rtime; /* (optional) requested renew_till */ 10437c478bd9Sstevel@tonic-gate krb5_int32 nonce; /* nonce to match request/response */ 10447c478bd9Sstevel@tonic-gate int nktypes; /* # of ktypes, must be positive */ 10457c478bd9Sstevel@tonic-gate krb5_enctype *ktype; /* requested enctype(s) */ 10467c478bd9Sstevel@tonic-gate krb5_address * *addresses; /* requested addresses, optional */ 10477c478bd9Sstevel@tonic-gate krb5_enc_data authorization_data; /* encrypted auth data; OPTIONAL */ 10487c478bd9Sstevel@tonic-gate krb5_authdata * *unenc_authdata; /* unencrypted auth data, 10497c478bd9Sstevel@tonic-gate if available */ 10507c478bd9Sstevel@tonic-gate krb5_ticket * *second_ticket;/* second ticket array; OPTIONAL */ 10517c478bd9Sstevel@tonic-gate } krb5_kdc_req; 10527c478bd9Sstevel@tonic-gate 10537c478bd9Sstevel@tonic-gate typedef struct _krb5_enc_kdc_rep_part { 10547c478bd9Sstevel@tonic-gate krb5_magic magic; 10557c478bd9Sstevel@tonic-gate /* encrypted part: */ 10567c478bd9Sstevel@tonic-gate krb5_msgtype msg_type; /* krb5 message type */ 10577c478bd9Sstevel@tonic-gate krb5_keyblock *session; /* session key */ 10587c478bd9Sstevel@tonic-gate krb5_last_req_entry * *last_req; /* array of ptrs to entries */ 10597c478bd9Sstevel@tonic-gate krb5_int32 nonce; /* nonce from request */ 10607c478bd9Sstevel@tonic-gate krb5_timestamp key_exp; /* expiration date */ 10617c478bd9Sstevel@tonic-gate krb5_flags flags; /* ticket flags */ 10627c478bd9Sstevel@tonic-gate krb5_ticket_times times; /* lifetime info */ 10637c478bd9Sstevel@tonic-gate krb5_principal server; /* server's principal identifier */ 10647c478bd9Sstevel@tonic-gate krb5_address * *caddrs; /* array of ptrs to addresses, 10657c478bd9Sstevel@tonic-gate optional */ 10667c478bd9Sstevel@tonic-gate } krb5_enc_kdc_rep_part; 10677c478bd9Sstevel@tonic-gate 10687c478bd9Sstevel@tonic-gate typedef struct _krb5_kdc_rep { 10697c478bd9Sstevel@tonic-gate krb5_magic magic; 10707c478bd9Sstevel@tonic-gate /* cleartext part: */ 10717c478bd9Sstevel@tonic-gate krb5_msgtype msg_type; /* AS_REP or KDC_REP? */ 10727c478bd9Sstevel@tonic-gate krb5_pa_data * *padata; /* preauthentication data from KDC */ 10737c478bd9Sstevel@tonic-gate krb5_principal client; /* client's principal identifier */ 10747c478bd9Sstevel@tonic-gate krb5_ticket *ticket; /* ticket */ 10757c478bd9Sstevel@tonic-gate krb5_enc_data enc_part; /* encryption type, kvno, encrypted 10767c478bd9Sstevel@tonic-gate encoding */ 10777c478bd9Sstevel@tonic-gate krb5_enc_kdc_rep_part *enc_part2;/* unencrypted version, if available */ 10787c478bd9Sstevel@tonic-gate } krb5_kdc_rep; 10797c478bd9Sstevel@tonic-gate 10807c478bd9Sstevel@tonic-gate /* error message structure */ 10817c478bd9Sstevel@tonic-gate typedef struct _krb5_error { 10827c478bd9Sstevel@tonic-gate krb5_magic magic; 10837c478bd9Sstevel@tonic-gate /* some of these may be meaningless in certain contexts */ 10847c478bd9Sstevel@tonic-gate krb5_timestamp ctime; /* client sec portion; optional */ 10857c478bd9Sstevel@tonic-gate krb5_int32 cusec; /* client usec portion; optional */ 10867c478bd9Sstevel@tonic-gate krb5_int32 susec; /* server usec portion */ 10877c478bd9Sstevel@tonic-gate krb5_timestamp stime; /* server sec portion */ 10887c478bd9Sstevel@tonic-gate krb5_ui_4 error; /* error code (protocol error #'s) */ 10897c478bd9Sstevel@tonic-gate krb5_principal client; /* client's principal identifier; 10907c478bd9Sstevel@tonic-gate optional */ 10917c478bd9Sstevel@tonic-gate krb5_principal server; /* server's principal identifier */ 10927c478bd9Sstevel@tonic-gate krb5_data text; /* descriptive text */ 10937c478bd9Sstevel@tonic-gate krb5_data e_data; /* additional error-describing data */ 10947c478bd9Sstevel@tonic-gate } krb5_error; 10957c478bd9Sstevel@tonic-gate 10967c478bd9Sstevel@tonic-gate typedef struct _krb5_ap_req { 10977c478bd9Sstevel@tonic-gate krb5_magic magic; 10987c478bd9Sstevel@tonic-gate krb5_flags ap_options; /* requested options */ 10997c478bd9Sstevel@tonic-gate krb5_ticket *ticket; /* ticket */ 11007c478bd9Sstevel@tonic-gate krb5_enc_data authenticator; /* authenticator (already encrypted) */ 11017c478bd9Sstevel@tonic-gate } krb5_ap_req; 11027c478bd9Sstevel@tonic-gate 11037c478bd9Sstevel@tonic-gate typedef struct _krb5_ap_rep { 11047c478bd9Sstevel@tonic-gate krb5_magic magic; 11057c478bd9Sstevel@tonic-gate krb5_enc_data enc_part; 11067c478bd9Sstevel@tonic-gate } krb5_ap_rep; 11077c478bd9Sstevel@tonic-gate 11087c478bd9Sstevel@tonic-gate typedef struct _krb5_ap_rep_enc_part { 11097c478bd9Sstevel@tonic-gate krb5_magic magic; 11107c478bd9Sstevel@tonic-gate krb5_timestamp ctime; /* client time, seconds portion */ 11117c478bd9Sstevel@tonic-gate krb5_int32 cusec; /* client time, microseconds portion */ 11127c478bd9Sstevel@tonic-gate krb5_keyblock *subkey; /* true session key, optional */ 11137c478bd9Sstevel@tonic-gate krb5_ui_4 seq_number; /* sequence #, optional */ 11147c478bd9Sstevel@tonic-gate } krb5_ap_rep_enc_part; 11157c478bd9Sstevel@tonic-gate 11167c478bd9Sstevel@tonic-gate typedef struct _krb5_response { 11177c478bd9Sstevel@tonic-gate krb5_magic magic; 11187c478bd9Sstevel@tonic-gate krb5_octet message_type; 11197c478bd9Sstevel@tonic-gate krb5_data response; 11207c478bd9Sstevel@tonic-gate krb5_int32 expected_nonce; /* The expected nonce for KDC_REP messages */ 11217c478bd9Sstevel@tonic-gate krb5_timestamp request_time; /* When we made the request */ 11227c478bd9Sstevel@tonic-gate } krb5_response; 11237c478bd9Sstevel@tonic-gate 11247c478bd9Sstevel@tonic-gate typedef struct _krb5_cred_info { 11257c478bd9Sstevel@tonic-gate krb5_magic magic; 11267c478bd9Sstevel@tonic-gate krb5_keyblock *session; /* session key used to encrypt */ 11277c478bd9Sstevel@tonic-gate /* ticket */ 11287c478bd9Sstevel@tonic-gate krb5_principal client; /* client name/realm, optional */ 11297c478bd9Sstevel@tonic-gate krb5_principal server; /* server name/realm, optional */ 11307c478bd9Sstevel@tonic-gate krb5_flags flags; /* ticket flags, optional */ 11317c478bd9Sstevel@tonic-gate krb5_ticket_times times; /* auth, start, end, renew_till, */ 11327c478bd9Sstevel@tonic-gate /* optional */ 11337c478bd9Sstevel@tonic-gate krb5_address * *caddrs; /* array of ptrs to addresses */ 11347c478bd9Sstevel@tonic-gate } krb5_cred_info; 11357c478bd9Sstevel@tonic-gate 11367c478bd9Sstevel@tonic-gate typedef struct _krb5_cred_enc_part { 11377c478bd9Sstevel@tonic-gate krb5_magic magic; 11387c478bd9Sstevel@tonic-gate krb5_int32 nonce; /* nonce, optional */ 11397c478bd9Sstevel@tonic-gate krb5_timestamp timestamp; /* client time */ 11407c478bd9Sstevel@tonic-gate krb5_int32 usec; /* microsecond portion of time */ 11417c478bd9Sstevel@tonic-gate krb5_address *s_address; /* sender address, optional */ 11427c478bd9Sstevel@tonic-gate krb5_address *r_address; /* recipient address, optional */ 11437c478bd9Sstevel@tonic-gate krb5_cred_info * *ticket_info; 11447c478bd9Sstevel@tonic-gate } krb5_cred_enc_part; 11457c478bd9Sstevel@tonic-gate 11467c478bd9Sstevel@tonic-gate typedef struct _krb5_cred { 11477c478bd9Sstevel@tonic-gate krb5_magic magic; 11487c478bd9Sstevel@tonic-gate krb5_ticket * *tickets; /* tickets */ 11497c478bd9Sstevel@tonic-gate krb5_enc_data enc_part; /* encrypted part */ 11507c478bd9Sstevel@tonic-gate krb5_cred_enc_part *enc_part2; /* unencrypted version, if available*/ 11517c478bd9Sstevel@tonic-gate } krb5_cred; 11527c478bd9Sstevel@tonic-gate 11537c478bd9Sstevel@tonic-gate /* Sandia password generation structures */ 11547c478bd9Sstevel@tonic-gate typedef struct _passwd_phrase_element { 11557c478bd9Sstevel@tonic-gate krb5_magic magic; 11567c478bd9Sstevel@tonic-gate krb5_data *passwd; 11577c478bd9Sstevel@tonic-gate krb5_data *phrase; 11587c478bd9Sstevel@tonic-gate } passwd_phrase_element; 11597c478bd9Sstevel@tonic-gate 11607c478bd9Sstevel@tonic-gate typedef struct _krb5_pwd_data { 11617c478bd9Sstevel@tonic-gate krb5_magic magic; 11627c478bd9Sstevel@tonic-gate int sequence_count; 11637c478bd9Sstevel@tonic-gate passwd_phrase_element * *element; 11647c478bd9Sstevel@tonic-gate } krb5_pwd_data; 11657c478bd9Sstevel@tonic-gate 11667c478bd9Sstevel@tonic-gate /* these need to be here so the typedefs are available for the prototypes */ 11677c478bd9Sstevel@tonic-gate 11687c478bd9Sstevel@tonic-gate /* 11697c478bd9Sstevel@tonic-gate * begin "safepriv.h" 11707c478bd9Sstevel@tonic-gate */ 11717c478bd9Sstevel@tonic-gate 11727c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_DO_TIME 0x00000001 11737c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_RET_TIME 0x00000002 11747c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_DO_SEQUENCE 0x00000004 11757c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_RET_SEQUENCE 0x00000008 11767c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_PERMIT_ALL 0x00000010 11777c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_USE_SUBKEY 0x00000020 11787c478bd9Sstevel@tonic-gate 11797c478bd9Sstevel@tonic-gate typedef struct krb5_replay_data { 11807c478bd9Sstevel@tonic-gate krb5_timestamp timestamp; 11817c478bd9Sstevel@tonic-gate krb5_int32 usec; 11827c478bd9Sstevel@tonic-gate krb5_int32 seq; 11837c478bd9Sstevel@tonic-gate } krb5_replay_data; 11847c478bd9Sstevel@tonic-gate 11857c478bd9Sstevel@tonic-gate /* flags for krb5_auth_con_genaddrs() */ 11867c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR 0x00000001 11877c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR 0x00000002 11887c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR 0x00000004 11897c478bd9Sstevel@tonic-gate #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR 0x00000008 11907c478bd9Sstevel@tonic-gate 11917c478bd9Sstevel@tonic-gate /* type of function used as a callback to generate checksum data for 11927c478bd9Sstevel@tonic-gate * mk_req */ 11937c478bd9Sstevel@tonic-gate 11947c478bd9Sstevel@tonic-gate typedef krb5_error_code 11957c478bd9Sstevel@tonic-gate (KRB5_CALLCONV * krb5_mk_req_checksum_func) ( 11967c478bd9Sstevel@tonic-gate krb5_context, 11977c478bd9Sstevel@tonic-gate krb5_auth_context, 11987c478bd9Sstevel@tonic-gate void *, 11997c478bd9Sstevel@tonic-gate krb5_data **); 12007c478bd9Sstevel@tonic-gate 12017c478bd9Sstevel@tonic-gate 12027c478bd9Sstevel@tonic-gate /* 12037c478bd9Sstevel@tonic-gate * end "safepriv.h" 12047c478bd9Sstevel@tonic-gate */ 12057c478bd9Sstevel@tonic-gate 12067c478bd9Sstevel@tonic-gate 12077c478bd9Sstevel@tonic-gate /* 12087c478bd9Sstevel@tonic-gate * begin "ccache.h" 12097c478bd9Sstevel@tonic-gate */ 12107c478bd9Sstevel@tonic-gate 12117c478bd9Sstevel@tonic-gate typedef krb5_pointer krb5_cc_cursor; /* cursor for sequential lookup */ 12127c478bd9Sstevel@tonic-gate 1213505d05c7Sgtb struct _krb5_ccache; 1214505d05c7Sgtb typedef struct _krb5_ccache *krb5_ccache; 1215505d05c7Sgtb struct _krb5_cc_ops; 1216505d05c7Sgtb typedef struct _krb5_cc_ops krb5_cc_ops; 12177c478bd9Sstevel@tonic-gate 12187c478bd9Sstevel@tonic-gate /* for retrieve_cred */ 12197c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_TIMES 0x00000001 12207c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_IS_SKEY 0x00000002 12217c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_FLAGS 0x00000004 12227c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_TIMES_EXACT 0x00000008 12237c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_FLAGS_EXACT 0x00000010 12247c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_AUTHDATA 0x00000020 12257c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_SRV_NAMEONLY 0x00000040 12267c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_2ND_TKT 0x00000080 12277c478bd9Sstevel@tonic-gate #define KRB5_TC_MATCH_KTYPE 0x00000100 12287c478bd9Sstevel@tonic-gate #define KRB5_TC_SUPPORTED_KTYPES 0x00000200 12297c478bd9Sstevel@tonic-gate 12307c478bd9Sstevel@tonic-gate /* for set_flags and other functions */ 12317c478bd9Sstevel@tonic-gate #define KRB5_TC_OPENCLOSE 0x00000001 1232505d05c7Sgtb #define KRB5_TC_NOTICKET 0x00000002 1233505d05c7Sgtb 1234505d05c7Sgtb 1235505d05c7Sgtb 1236505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1237505d05c7Sgtb krb5_cc_gen_new (krb5_context context, krb5_ccache *cache); 1238505d05c7Sgtb 1239505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1240505d05c7Sgtb krb5_cc_initialize(krb5_context context, krb5_ccache cache, 1241505d05c7Sgtb krb5_principal principal); 1242505d05c7Sgtb 1243505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1244505d05c7Sgtb krb5_cc_destroy (krb5_context context, krb5_ccache cache); 1245505d05c7Sgtb 1246505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1247505d05c7Sgtb krb5_cc_close (krb5_context context, krb5_ccache cache); 1248505d05c7Sgtb 1249505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1250505d05c7Sgtb krb5_cc_store_cred (krb5_context context, krb5_ccache cache, 1251505d05c7Sgtb krb5_creds *creds); 1252505d05c7Sgtb 1253505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1254505d05c7Sgtb krb5_cc_retrieve_cred (krb5_context context, krb5_ccache cache, 1255505d05c7Sgtb krb5_flags flags, krb5_creds *mcreds, 1256505d05c7Sgtb krb5_creds *creds); 1257505d05c7Sgtb 1258505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1259505d05c7Sgtb krb5_cc_get_principal (krb5_context context, krb5_ccache cache, 1260505d05c7Sgtb krb5_principal *principal); 1261505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1262505d05c7Sgtb krb5_cc_start_seq_get (krb5_context context, krb5_ccache cache, 1263505d05c7Sgtb krb5_cc_cursor *cursor); 12647c478bd9Sstevel@tonic-gate 1265505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1266505d05c7Sgtb krb5_cc_next_cred (krb5_context context, krb5_ccache cache, 1267505d05c7Sgtb krb5_cc_cursor *cursor, krb5_creds *creds); 1268505d05c7Sgtb 1269505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1270505d05c7Sgtb krb5_cc_end_seq_get (krb5_context context, krb5_ccache cache, 1271505d05c7Sgtb krb5_cc_cursor *cursor); 1272505d05c7Sgtb 1273505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1274505d05c7Sgtb krb5_cc_remove_cred (krb5_context context, krb5_ccache cache, krb5_flags flags, 1275505d05c7Sgtb krb5_creds *creds); 1276505d05c7Sgtb 1277505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1278505d05c7Sgtb krb5_cc_set_flags (krb5_context context, krb5_ccache cache, krb5_flags flags); 1279505d05c7Sgtb 1280505d05c7Sgtb const char * KRB5_CALLCONV 1281505d05c7Sgtb krb5_cc_get_type (krb5_context context, krb5_ccache cache); 1282505d05c7Sgtb 1283505d05c7Sgtb /* SUNW14resync - add_cred.c needs this func */ 1284505d05c7Sgtb const char * KRB5_CALLCONV 1285505d05c7Sgtb krb5_cc_get_name (krb5_context context, krb5_ccache cache); 12867c478bd9Sstevel@tonic-gate 12877c478bd9Sstevel@tonic-gate /* 12887c478bd9Sstevel@tonic-gate * end "ccache.h" 12897c478bd9Sstevel@tonic-gate */ 12907c478bd9Sstevel@tonic-gate 12917c478bd9Sstevel@tonic-gate /* 12927c478bd9Sstevel@tonic-gate * begin "rcache.h" 12937c478bd9Sstevel@tonic-gate */ 12947c478bd9Sstevel@tonic-gate 1295505d05c7Sgtb struct krb5_rc_st; 1296505d05c7Sgtb typedef struct krb5_rc_st *krb5_rcache; 12977c478bd9Sstevel@tonic-gate 12987c478bd9Sstevel@tonic-gate /* 12997c478bd9Sstevel@tonic-gate * end "rcache.h" 13007c478bd9Sstevel@tonic-gate */ 13017c478bd9Sstevel@tonic-gate 13027c478bd9Sstevel@tonic-gate /* 13037c478bd9Sstevel@tonic-gate * begin "keytab.h" 13047c478bd9Sstevel@tonic-gate */ 13057c478bd9Sstevel@tonic-gate 13067c478bd9Sstevel@tonic-gate 13077c478bd9Sstevel@tonic-gate /* XXX */ 13087c478bd9Sstevel@tonic-gate #define MAX_KEYTAB_NAME_LEN 1100 /* Long enough for MAXPATHLEN + some extra */ 13097c478bd9Sstevel@tonic-gate 13107c478bd9Sstevel@tonic-gate typedef krb5_pointer krb5_kt_cursor; /* XXX */ 13117c478bd9Sstevel@tonic-gate 13127c478bd9Sstevel@tonic-gate typedef struct krb5_keytab_entry_st { 13137c478bd9Sstevel@tonic-gate krb5_magic magic; 13147c478bd9Sstevel@tonic-gate krb5_principal principal; /* principal of this key */ 13157c478bd9Sstevel@tonic-gate krb5_timestamp timestamp; /* time entry written to keytable */ 13167c478bd9Sstevel@tonic-gate krb5_kvno vno; /* key version number */ 13177c478bd9Sstevel@tonic-gate krb5_keyblock key; /* the secret key */ 13187c478bd9Sstevel@tonic-gate } krb5_keytab_entry; 13197c478bd9Sstevel@tonic-gate 1320505d05c7Sgtb #if KRB5_PRIVATE 1321505d05c7Sgtb struct _krb5_kt_ops; 1322505d05c7Sgtb typedef struct _krb5_kt { /* should move into k5-int.h */ 13237c478bd9Sstevel@tonic-gate krb5_magic magic; 1324505d05c7Sgtb const struct _krb5_kt_ops *ops; 13257c478bd9Sstevel@tonic-gate krb5_pointer data; 1326505d05c7Sgtb } *krb5_keytab; 1327505d05c7Sgtb #else 1328505d05c7Sgtb struct _krb5_kt; 1329505d05c7Sgtb typedef struct _krb5_kt *krb5_keytab; 1330505d05c7Sgtb #endif 13317c478bd9Sstevel@tonic-gate 1332505d05c7Sgtb char * KRB5_CALLCONV 1333505d05c7Sgtb krb5_kt_get_type (krb5_context, krb5_keytab keytab); 1334505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1335505d05c7Sgtb krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name, 1336505d05c7Sgtb unsigned int namelen); 1337505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1338505d05c7Sgtb krb5_kt_close(krb5_context context, krb5_keytab keytab); 1339505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1340505d05c7Sgtb krb5_kt_get_entry(krb5_context context, krb5_keytab keytab, 1341505d05c7Sgtb krb5_const_principal principal, krb5_kvno vno, 1342505d05c7Sgtb krb5_enctype enctype, krb5_keytab_entry *entry); 1343505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1344505d05c7Sgtb krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab, 1345505d05c7Sgtb krb5_kt_cursor *cursor); 1346505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1347505d05c7Sgtb krb5_kt_next_entry(krb5_context context, krb5_keytab keytab, 1348505d05c7Sgtb krb5_keytab_entry *entry, krb5_kt_cursor *cursor); 1349505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1350505d05c7Sgtb krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab, 1351505d05c7Sgtb krb5_kt_cursor *cursor); 13527c478bd9Sstevel@tonic-gate 13537c478bd9Sstevel@tonic-gate /* 13547c478bd9Sstevel@tonic-gate * end "keytab.h" 13557c478bd9Sstevel@tonic-gate */ 13567c478bd9Sstevel@tonic-gate 13577c478bd9Sstevel@tonic-gate /* 13587c478bd9Sstevel@tonic-gate * begin "func-proto.h" 13597c478bd9Sstevel@tonic-gate */ 13607c478bd9Sstevel@tonic-gate 1361505d05c7Sgtb /* Solaris Kerberos */ 13627c478bd9Sstevel@tonic-gate krb5_error_code krb5_init_ef_handle(krb5_context); 13637c478bd9Sstevel@tonic-gate krb5_error_code krb5_free_ef_handle(krb5_context); 13647c478bd9Sstevel@tonic-gate 13657c478bd9Sstevel@tonic-gate krb5_boolean krb5_privacy_allowed(void); 13667c478bd9Sstevel@tonic-gate 1367505d05c7Sgtb /* 1368505d05c7Sgtb * Solaris Kerberos: 1369505d05c7Sgtb * krb5_copy_keyblock_data is a new routine to hide the details 1370505d05c7Sgtb * of a keyblock copy operation. 1371505d05c7Sgtb */ 1372505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_data 1373505d05c7Sgtb (krb5_context, 1374505d05c7Sgtb const krb5_keyblock *, 1375505d05c7Sgtb krb5_keyblock *); 1376505d05c7Sgtb 1377505d05c7Sgtb 1378505d05c7Sgtb 1379505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_init_context 1380505d05c7Sgtb (krb5_context *); 1381505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_init_secure_context 1382505d05c7Sgtb (krb5_context *); 1383505d05c7Sgtb void KRB5_CALLCONV krb5_free_context 1384505d05c7Sgtb (krb5_context); 1385505d05c7Sgtb 1386505d05c7Sgtb #if KRB5_PRIVATE 13877c478bd9Sstevel@tonic-gate krb5_error_code krb5_set_default_in_tkt_ktypes 1388505d05c7Sgtb (krb5_context, 1389505d05c7Sgtb const krb5_enctype *); 13907c478bd9Sstevel@tonic-gate krb5_error_code krb5_get_default_in_tkt_ktypes 1391505d05c7Sgtb (krb5_context, 1392505d05c7Sgtb krb5_enctype **); 13937c478bd9Sstevel@tonic-gate 13947c478bd9Sstevel@tonic-gate krb5_error_code krb5_set_default_tgs_ktypes 1395505d05c7Sgtb (krb5_context, 1396505d05c7Sgtb const krb5_enctype *); 1397505d05c7Sgtb #endif 1398505d05c7Sgtb 13997c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 14007c478bd9Sstevel@tonic-gate krb5_set_default_tgs_enctypes 14017c478bd9Sstevel@tonic-gate (krb5_context, 1402505d05c7Sgtb const krb5_enctype *); 1403505d05c7Sgtb #if KRB5_PRIVATE 14047c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_tgs_ktypes 1405505d05c7Sgtb (krb5_context, 1406505d05c7Sgtb krb5_const_principal, 1407505d05c7Sgtb krb5_enctype **); 1408505d05c7Sgtb #endif 14097c478bd9Sstevel@tonic-gate 1410505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_get_permitted_enctypes 1411505d05c7Sgtb (krb5_context, krb5_enctype **); 1412505d05c7Sgtb 1413505d05c7Sgtb #if KRB5_PRIVATE 14147c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_ktypes 1415505d05c7Sgtb (krb5_context, krb5_enctype *); 14167c478bd9Sstevel@tonic-gate 14177c478bd9Sstevel@tonic-gate krb5_boolean krb5_is_permitted_enctype 1418505d05c7Sgtb (krb5_context, krb5_enctype); 1419505d05c7Sgtb #endif 1420505d05c7Sgtb 1421505d05c7Sgtb krb5_boolean KRB5_CALLCONV krb5_is_thread_safe(void); 14227c478bd9Sstevel@tonic-gate 14237c478bd9Sstevel@tonic-gate /* libkrb.spec */ 1424505d05c7Sgtb #if KRB5_PRIVATE 14257c478bd9Sstevel@tonic-gate krb5_error_code krb5_kdc_rep_decrypt_proc 1426505d05c7Sgtb (krb5_context, 1427505d05c7Sgtb const krb5_keyblock *, 1428505d05c7Sgtb krb5_const_pointer, 1429505d05c7Sgtb krb5_kdc_rep * ); 1430505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_decrypt_tkt_part 1431505d05c7Sgtb (krb5_context, 1432505d05c7Sgtb const krb5_keyblock *, 1433505d05c7Sgtb krb5_ticket * ); 14347c478bd9Sstevel@tonic-gate krb5_error_code krb5_get_cred_from_kdc 1435505d05c7Sgtb (krb5_context, 1436505d05c7Sgtb krb5_ccache, /* not const, as reading may save 14377c478bd9Sstevel@tonic-gate state */ 1438505d05c7Sgtb krb5_creds *, 1439505d05c7Sgtb krb5_creds **, 1440505d05c7Sgtb krb5_creds *** ); 14417c478bd9Sstevel@tonic-gate krb5_error_code krb5_get_cred_from_kdc_validate 1442505d05c7Sgtb (krb5_context, 1443505d05c7Sgtb krb5_ccache, /* not const, as reading may save 14447c478bd9Sstevel@tonic-gate state */ 1445505d05c7Sgtb krb5_creds *, 1446505d05c7Sgtb krb5_creds **, 1447505d05c7Sgtb krb5_creds *** ); 14487c478bd9Sstevel@tonic-gate krb5_error_code krb5_get_cred_from_kdc_renew 1449505d05c7Sgtb (krb5_context, 1450505d05c7Sgtb krb5_ccache, /* not const, as reading may save 14517c478bd9Sstevel@tonic-gate state */ 1452505d05c7Sgtb krb5_creds *, 1453505d05c7Sgtb krb5_creds **, 1454505d05c7Sgtb krb5_creds *** ); 1455505d05c7Sgtb #endif 1456505d05c7Sgtb 14577c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_tgt_creds 1458505d05c7Sgtb (krb5_context, 1459505d05c7Sgtb krb5_creds **); /* XXX too hard to do with const */ 14607c478bd9Sstevel@tonic-gate 14617c478bd9Sstevel@tonic-gate #define KRB5_GC_USER_USER 1 /* want user-user ticket */ 14627c478bd9Sstevel@tonic-gate #define KRB5_GC_CACHED 2 /* want cached ticket only */ 14637c478bd9Sstevel@tonic-gate 14647c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_credentials 1465505d05c7Sgtb (krb5_context, 1466505d05c7Sgtb krb5_flags, 1467505d05c7Sgtb krb5_ccache, 1468505d05c7Sgtb krb5_creds *, 1469505d05c7Sgtb krb5_creds **); 14707c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_credentials_validate 1471505d05c7Sgtb (krb5_context, 1472505d05c7Sgtb krb5_flags, 1473505d05c7Sgtb krb5_ccache, 1474505d05c7Sgtb krb5_creds *, 1475505d05c7Sgtb krb5_creds **); 14767c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_credentials_renew 1477505d05c7Sgtb (krb5_context, 1478505d05c7Sgtb krb5_flags, 1479505d05c7Sgtb krb5_ccache, 1480505d05c7Sgtb krb5_creds *, 1481505d05c7Sgtb krb5_creds **); 1482505d05c7Sgtb #if KRB5_PRIVATE 14837c478bd9Sstevel@tonic-gate krb5_error_code krb5_get_cred_via_tkt 1484505d05c7Sgtb (krb5_context, 1485505d05c7Sgtb krb5_creds *, 1486505d05c7Sgtb krb5_flags, 1487505d05c7Sgtb krb5_address * const *, 1488505d05c7Sgtb krb5_creds *, 1489505d05c7Sgtb krb5_creds **); 1490505d05c7Sgtb #endif 14917c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_req 1492505d05c7Sgtb (krb5_context, 14937c478bd9Sstevel@tonic-gate krb5_auth_context *, 1494505d05c7Sgtb krb5_flags, 14957c478bd9Sstevel@tonic-gate char *, 14967c478bd9Sstevel@tonic-gate char *, 14977c478bd9Sstevel@tonic-gate krb5_data *, 14987c478bd9Sstevel@tonic-gate krb5_ccache, 1499505d05c7Sgtb krb5_data * ); 15007c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_req_extended 1501505d05c7Sgtb (krb5_context, 1502505d05c7Sgtb krb5_auth_context *, 1503505d05c7Sgtb krb5_flags, 1504505d05c7Sgtb krb5_data *, 1505505d05c7Sgtb krb5_creds *, 1506505d05c7Sgtb krb5_data * ); 15077c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_rep 1508505d05c7Sgtb (krb5_context, 15097c478bd9Sstevel@tonic-gate krb5_auth_context, 1510505d05c7Sgtb krb5_data *); 15117c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_rd_rep 1512505d05c7Sgtb (krb5_context, 1513505d05c7Sgtb krb5_auth_context, 1514505d05c7Sgtb const krb5_data *, 1515505d05c7Sgtb krb5_ap_rep_enc_part **); 15167c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_error 1517505d05c7Sgtb (krb5_context, 1518505d05c7Sgtb const krb5_error *, 1519505d05c7Sgtb krb5_data * ); 15207c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_rd_error 1521505d05c7Sgtb (krb5_context, 1522505d05c7Sgtb const krb5_data *, 1523505d05c7Sgtb krb5_error ** ); 15247c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_rd_safe 1525505d05c7Sgtb (krb5_context, 15267c478bd9Sstevel@tonic-gate krb5_auth_context, 1527505d05c7Sgtb const krb5_data *, 15287c478bd9Sstevel@tonic-gate krb5_data *, 1529505d05c7Sgtb krb5_replay_data *); 15307c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_rd_priv 1531505d05c7Sgtb (krb5_context, 15327c478bd9Sstevel@tonic-gate krb5_auth_context, 1533505d05c7Sgtb const krb5_data *, 15347c478bd9Sstevel@tonic-gate krb5_data *, 1535505d05c7Sgtb krb5_replay_data *); 15367c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_parse_name 1537505d05c7Sgtb (krb5_context, 1538505d05c7Sgtb const char *, 1539505d05c7Sgtb krb5_principal * ); 15407c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_unparse_name 1541505d05c7Sgtb (krb5_context, 1542505d05c7Sgtb krb5_const_principal, 1543505d05c7Sgtb char ** ); 15447c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_unparse_name_ext 1545505d05c7Sgtb (krb5_context, 15467c478bd9Sstevel@tonic-gate krb5_const_principal, 1547505d05c7Sgtb char **, 1548505d05c7Sgtb unsigned int *); 15497c478bd9Sstevel@tonic-gate 15507c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_set_principal_realm 1551505d05c7Sgtb (krb5_context, krb5_principal, const char *); 1552505d05c7Sgtb 1553505d05c7Sgtb krb5_boolean KRB5_CALLCONV_WRONG krb5_address_search 1554505d05c7Sgtb (krb5_context, 1555505d05c7Sgtb const krb5_address *, 1556505d05c7Sgtb krb5_address * const *); 1557505d05c7Sgtb krb5_boolean KRB5_CALLCONV krb5_address_compare 1558505d05c7Sgtb (krb5_context, 1559505d05c7Sgtb const krb5_address *, 1560505d05c7Sgtb const krb5_address *); 1561505d05c7Sgtb int KRB5_CALLCONV krb5_address_order 1562505d05c7Sgtb (krb5_context, 1563505d05c7Sgtb const krb5_address *, 1564505d05c7Sgtb const krb5_address *); 1565505d05c7Sgtb krb5_boolean KRB5_CALLCONV krb5_realm_compare 1566505d05c7Sgtb (krb5_context, 1567505d05c7Sgtb krb5_const_principal, 1568505d05c7Sgtb krb5_const_principal); 1569505d05c7Sgtb krb5_boolean KRB5_CALLCONV krb5_principal_compare 1570505d05c7Sgtb (krb5_context, 1571505d05c7Sgtb krb5_const_principal, 1572505d05c7Sgtb krb5_const_principal); 1573505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_init_keyblock 1574505d05c7Sgtb (krb5_context, krb5_enctype enctype, 1575505d05c7Sgtb size_t length, krb5_keyblock **out); 1576505d05c7Sgtb /* Initialize a new keyblock and allocate storage 1577505d05c7Sgtb * for the contents of the key, which will be freed along 1578505d05c7Sgtb * with the keyblock when krb5_free_keyblock is called. 1579505d05c7Sgtb * It is legal to pass in a length of 0, in which 1580505d05c7Sgtb * case contents are left unallocated. 1581505d05c7Sgtb */ 1582*10db1377Sgtb 1583*10db1377Sgtb /* 1584*10db1377Sgtb * Solaris Kerberos 1585*10db1377Sgtb * Start - keyblock API (MIT will ship this also in a future release) 1586*10db1377Sgtb */ 1587*10db1377Sgtb /* 1588*10db1377Sgtb * Similiar to krb5_init_keyblock but this routine expects the 1589*10db1377Sgtb * keyblock to already be allocated. 1590*10db1377Sgtb */ 1591*10db1377Sgtb krb5_error_code KRB5_CALLCONV krb5_init_allocated_keyblock 1592*10db1377Sgtb (krb5_context, 1593*10db1377Sgtb krb5_enctype, 1594*10db1377Sgtb unsigned int, 1595*10db1377Sgtb krb5_keyblock *); 1596*10db1377Sgtb 1597*10db1377Sgtb krb5_enctype KRB5_CALLCONV krb5_get_key_enctype 1598*10db1377Sgtb (krb5_keyblock *); 1599*10db1377Sgtb 1600*10db1377Sgtb unsigned int KRB5_CALLCONV krb5_get_key_length 1601*10db1377Sgtb (krb5_keyblock *); 1602*10db1377Sgtb 1603*10db1377Sgtb krb5_octet KRB5_CALLCONV *krb5_get_key_data 1604*10db1377Sgtb (krb5_keyblock *); 1605*10db1377Sgtb 1606*10db1377Sgtb void KRB5_CALLCONV krb5_set_key_enctype 1607*10db1377Sgtb (krb5_keyblock *, 1608*10db1377Sgtb krb5_enctype); 1609*10db1377Sgtb 1610*10db1377Sgtb void KRB5_CALLCONV krb5_set_key_data 1611*10db1377Sgtb (krb5_keyblock *, 1612*10db1377Sgtb krb5_octet *); 1613*10db1377Sgtb 1614*10db1377Sgtb void KRB5_CALLCONV krb5_set_key_length 1615*10db1377Sgtb (krb5_keyblock *, 1616*10db1377Sgtb unsigned int); 1617*10db1377Sgtb /* 1618*10db1377Sgtb * Solaris Kerberos 1619*10db1377Sgtb * End - keyblock API 1620*10db1377Sgtb */ 1621*10db1377Sgtb 16227c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_keyblock 1623505d05c7Sgtb (krb5_context, 1624505d05c7Sgtb const krb5_keyblock *, 1625505d05c7Sgtb krb5_keyblock **); 16267c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_contents 1627505d05c7Sgtb (krb5_context, 1628505d05c7Sgtb const krb5_keyblock *, 1629505d05c7Sgtb krb5_keyblock *); 16307c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_creds 1631505d05c7Sgtb (krb5_context, 1632505d05c7Sgtb const krb5_creds *, 1633505d05c7Sgtb krb5_creds **); 16347c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_data 1635505d05c7Sgtb (krb5_context, 1636505d05c7Sgtb const krb5_data *, 1637505d05c7Sgtb krb5_data **); 16387c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_principal 1639505d05c7Sgtb (krb5_context, 16407c478bd9Sstevel@tonic-gate krb5_const_principal, 1641505d05c7Sgtb krb5_principal *); 1642505d05c7Sgtb #if KRB5_PRIVATE 16437c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_addr 1644505d05c7Sgtb (krb5_context, 16457c478bd9Sstevel@tonic-gate const krb5_address *, 1646505d05c7Sgtb krb5_address **); 1647505d05c7Sgtb #endif 16487c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_addresses 1649505d05c7Sgtb (krb5_context, 1650505d05c7Sgtb krb5_address * const *, 1651505d05c7Sgtb krb5_address ***); 16527c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_ticket 1653505d05c7Sgtb (krb5_context, 1654505d05c7Sgtb const krb5_ticket *, 1655505d05c7Sgtb krb5_ticket **); 16567c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_authdata 1657505d05c7Sgtb (krb5_context, 1658505d05c7Sgtb krb5_authdata * const *, 1659505d05c7Sgtb krb5_authdata ***); 16607c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_authenticator 1661505d05c7Sgtb (krb5_context, 1662505d05c7Sgtb const krb5_authenticator *, 1663505d05c7Sgtb krb5_authenticator **); 16647c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_copy_checksum 1665505d05c7Sgtb (krb5_context, 1666505d05c7Sgtb const krb5_checksum *, 1667505d05c7Sgtb krb5_checksum **); 1668505d05c7Sgtb #if KRB5_PRIVATE 16697c478bd9Sstevel@tonic-gate void krb5_init_ets 1670505d05c7Sgtb (krb5_context); 16717c478bd9Sstevel@tonic-gate void krb5_free_ets 1672505d05c7Sgtb (krb5_context); 16737c478bd9Sstevel@tonic-gate krb5_error_code krb5_generate_subkey 1674505d05c7Sgtb (krb5_context, 1675505d05c7Sgtb const krb5_keyblock *, krb5_keyblock **); 16767c478bd9Sstevel@tonic-gate krb5_error_code krb5_generate_seq_number 1677505d05c7Sgtb (krb5_context, 1678505d05c7Sgtb const krb5_keyblock *, krb5_ui_4 *); 1679505d05c7Sgtb #endif 16807c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_server_rcache 1681505d05c7Sgtb (krb5_context, 1682505d05c7Sgtb const krb5_data *, krb5_rcache *); 16837c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV_C krb5_build_principal_ext 1684505d05c7Sgtb (krb5_context, krb5_principal *, unsigned int, const char *, ...); 1685505d05c7Sgtb krb5_error_code KRB5_CALLCONV_C krb5_build_principal 1686505d05c7Sgtb (krb5_context, krb5_principal *, unsigned int, const char *, ...); 16877c478bd9Sstevel@tonic-gate #ifdef va_start 16887c478bd9Sstevel@tonic-gate /* XXX depending on varargs include file defining va_start... */ 1689505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_build_principal_va 1690505d05c7Sgtb (krb5_context, 1691505d05c7Sgtb krb5_principal, unsigned int, const char *, va_list); 16927c478bd9Sstevel@tonic-gate #endif 16937c478bd9Sstevel@tonic-gate 16947c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_425_conv_principal 1695505d05c7Sgtb (krb5_context, 1696505d05c7Sgtb const char *name, 1697505d05c7Sgtb const char *instance, const char *realm, 1698505d05c7Sgtb krb5_principal *princ); 16997c478bd9Sstevel@tonic-gate 17007c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_524_conv_principal 1701505d05c7Sgtb (krb5_context context, krb5_const_principal princ, 1702505d05c7Sgtb char *name, char *inst, char *realm); 1703505d05c7Sgtb 1704505d05c7Sgtb struct credentials; 1705505d05c7Sgtb int KRB5_CALLCONV krb5_524_convert_creds 1706505d05c7Sgtb (krb5_context context, krb5_creds *v5creds, 1707505d05c7Sgtb struct credentials *v4creds); 1708505d05c7Sgtb #if KRB5_DEPRECATED 1709505d05c7Sgtb #define krb524_convert_creds_kdc krb5_524_convert_creds 1710505d05c7Sgtb #define krb524_init_ets(x) (0) 1711505d05c7Sgtb #endif 17127c478bd9Sstevel@tonic-gate 17137c478bd9Sstevel@tonic-gate /* libkt.spec */ 1714505d05c7Sgtb #if KRB5_PRIVATE 17157c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_register 1716505d05c7Sgtb (krb5_context, 1717505d05c7Sgtb const struct _krb5_kt_ops * ); 1718505d05c7Sgtb #endif 1719505d05c7Sgtb 17207c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_resolve 1721505d05c7Sgtb (krb5_context, 1722505d05c7Sgtb const char *, 1723505d05c7Sgtb krb5_keytab * ); 17247c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_default_name 1725505d05c7Sgtb (krb5_context, 17267c478bd9Sstevel@tonic-gate char *, 1727505d05c7Sgtb int ); 17287c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_default 1729505d05c7Sgtb (krb5_context, 1730505d05c7Sgtb krb5_keytab * ); 1731505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_free_keytab_entry_contents 1732505d05c7Sgtb (krb5_context, 1733505d05c7Sgtb krb5_keytab_entry * ); 1734505d05c7Sgtb #if KRB5_PRIVATE 1735505d05c7Sgtb /* use krb5_free_keytab_entry_contents instead */ 17367c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_free_entry 1737505d05c7Sgtb (krb5_context, 1738505d05c7Sgtb krb5_keytab_entry * ); 1739505d05c7Sgtb #endif 17407c478bd9Sstevel@tonic-gate /* remove and add are functions, so that they can return NOWRITE 17417c478bd9Sstevel@tonic-gate if not a writable keytab */ 17427c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_remove_entry 1743505d05c7Sgtb (krb5_context, 17447c478bd9Sstevel@tonic-gate krb5_keytab, 1745505d05c7Sgtb krb5_keytab_entry * ); 17467c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_add_entry 1747505d05c7Sgtb (krb5_context, 17487c478bd9Sstevel@tonic-gate krb5_keytab, 1749505d05c7Sgtb krb5_keytab_entry * ); 1750505d05c7Sgtb krb5_error_code KRB5_CALLCONV_WRONG krb5_principal2salt 1751505d05c7Sgtb (krb5_context, 1752505d05c7Sgtb krb5_const_principal, krb5_data *); 1753505d05c7Sgtb #if KRB5_PRIVATE 17547c478bd9Sstevel@tonic-gate krb5_error_code krb5_principal2salt_norealm 1755505d05c7Sgtb (krb5_context, 1756505d05c7Sgtb krb5_const_principal, krb5_data *); 1757505d05c7Sgtb #endif 17587c478bd9Sstevel@tonic-gate /* librc.spec--see rcache.h */ 17597c478bd9Sstevel@tonic-gate 17607c478bd9Sstevel@tonic-gate /* libcc.spec */ 17617c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_cc_resolve 1762505d05c7Sgtb (krb5_context, 1763505d05c7Sgtb const char *, 1764505d05c7Sgtb krb5_ccache * ); 1765505d05c7Sgtb const char * KRB5_CALLCONV krb5_cc_default_name 1766505d05c7Sgtb (krb5_context); 17677c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_cc_set_default_name 1768505d05c7Sgtb (krb5_context, const char *); 17697c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_cc_default 1770505d05c7Sgtb (krb5_context, 1771505d05c7Sgtb krb5_ccache *); 1772505d05c7Sgtb #if KRB5_PRIVATE 1773505d05c7Sgtb unsigned int KRB5_CALLCONV krb5_get_notification_message 1774505d05c7Sgtb (void); 1775505d05c7Sgtb #endif 17767c478bd9Sstevel@tonic-gate 17777c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_cc_copy_creds 1778505d05c7Sgtb (krb5_context context, 17797c478bd9Sstevel@tonic-gate krb5_ccache incc, 1780505d05c7Sgtb krb5_ccache outcc); 17817c478bd9Sstevel@tonic-gate 17827c478bd9Sstevel@tonic-gate 17837c478bd9Sstevel@tonic-gate /* chk_trans.c */ 1784505d05c7Sgtb #if KRB5_PRIVATE 17857c478bd9Sstevel@tonic-gate krb5_error_code krb5_check_transited_list 1786505d05c7Sgtb (krb5_context, const krb5_data *trans, 1787505d05c7Sgtb const krb5_data *realm1, const krb5_data *realm2); 1788505d05c7Sgtb #endif 17897c478bd9Sstevel@tonic-gate 17907c478bd9Sstevel@tonic-gate /* free_rtree.c */ 1791505d05c7Sgtb #if KRB5_PRIVATE 17927c478bd9Sstevel@tonic-gate void krb5_free_realm_tree 1793505d05c7Sgtb (krb5_context, 1794505d05c7Sgtb krb5_principal *); 1795505d05c7Sgtb #endif 17967c478bd9Sstevel@tonic-gate 17977c478bd9Sstevel@tonic-gate /* krb5_free.c */ 17987c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_principal 1799505d05c7Sgtb (krb5_context, krb5_principal ); 18007c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_authenticator 1801505d05c7Sgtb (krb5_context, krb5_authenticator * ); 1802505d05c7Sgtb #if KRB5_PRIVATE 18037c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_authenticator_contents 1804505d05c7Sgtb (krb5_context, krb5_authenticator * ); 1805505d05c7Sgtb #endif 18067c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_addresses 1807505d05c7Sgtb (krb5_context, krb5_address ** ); 1808505d05c7Sgtb #if KRB5_PRIVATE 18097c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_address 1810505d05c7Sgtb (krb5_context, krb5_address * ); 1811505d05c7Sgtb #endif 18127c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_authdata 1813505d05c7Sgtb (krb5_context, krb5_authdata ** ); 1814505d05c7Sgtb #if KRB5_PRIVATE 18157c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_enc_tkt_part 1816505d05c7Sgtb (krb5_context, krb5_enc_tkt_part * ); 1817505d05c7Sgtb #endif 18187c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_ticket 1819505d05c7Sgtb (krb5_context, krb5_ticket * ); 1820505d05c7Sgtb #if KRB5_PRIVATE 18217c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_tickets 1822505d05c7Sgtb (krb5_context, krb5_ticket ** ); 18237c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_kdc_req 1824505d05c7Sgtb (krb5_context, krb5_kdc_req * ); 18257c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_kdc_rep 1826505d05c7Sgtb (krb5_context, krb5_kdc_rep * ); 18277c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_last_req 1828505d05c7Sgtb (krb5_context, krb5_last_req_entry ** ); 18297c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_enc_kdc_rep_part 1830505d05c7Sgtb (krb5_context, krb5_enc_kdc_rep_part * ); 1831505d05c7Sgtb #endif 18327c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_error 1833505d05c7Sgtb (krb5_context, krb5_error * ); 1834505d05c7Sgtb #if KRB5_PRIVATE 18357c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_ap_req 1836505d05c7Sgtb (krb5_context, krb5_ap_req * ); 18377c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_ap_rep 1838505d05c7Sgtb (krb5_context, krb5_ap_rep * ); 18397c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_cred 1840505d05c7Sgtb (krb5_context, krb5_cred *); 1841505d05c7Sgtb #endif 18427c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_creds 1843505d05c7Sgtb (krb5_context, krb5_creds *); 18447c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_cred_contents 1845505d05c7Sgtb (krb5_context, krb5_creds *); 1846505d05c7Sgtb #if KRB5_PRIVATE 18477c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_cred_enc_part 1848505d05c7Sgtb (krb5_context, krb5_cred_enc_part *); 1849505d05c7Sgtb #endif 18507c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_checksum 1851505d05c7Sgtb (krb5_context, krb5_checksum *); 18527c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_checksum_contents 1853505d05c7Sgtb (krb5_context, krb5_checksum *); 18547c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_keyblock 1855505d05c7Sgtb (krb5_context, krb5_keyblock *); 18567c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_keyblock_contents 1857505d05c7Sgtb (krb5_context, krb5_keyblock *); 1858505d05c7Sgtb #if KRB5_PRIVATE 18597c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_pa_data 1860505d05c7Sgtb (krb5_context, krb5_pa_data **); 1861505d05c7Sgtb #endif 18627c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_ap_rep_enc_part 1863505d05c7Sgtb (krb5_context, krb5_ap_rep_enc_part *); 1864505d05c7Sgtb #if KRB5_PRIVATE 18657c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_tkt_authent 1866505d05c7Sgtb (krb5_context, krb5_tkt_authent *); 18677c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_pwd_data 1868505d05c7Sgtb (krb5_context, krb5_pwd_data *); 18697c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_pwd_sequences 1870505d05c7Sgtb (krb5_context, passwd_phrase_element **); 1871505d05c7Sgtb #endif 18727c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_data 1873505d05c7Sgtb (krb5_context, krb5_data *); 18747c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_data_contents 1875505d05c7Sgtb (krb5_context, krb5_data *); 18767c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_unparsed_name 1877505d05c7Sgtb (krb5_context, char *); 18787c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_cksumtypes 1879505d05c7Sgtb (krb5_context, krb5_cksumtype *); 18807c478bd9Sstevel@tonic-gate 18817c478bd9Sstevel@tonic-gate /* From krb5/os but needed but by the outside world */ 18827c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_us_timeofday 1883505d05c7Sgtb (krb5_context, 1884505d05c7Sgtb krb5_int32 *, 1885505d05c7Sgtb krb5_int32 * ); 18867c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_timeofday 1887505d05c7Sgtb (krb5_context, 1888505d05c7Sgtb krb5_int32 * ); 18897c478bd9Sstevel@tonic-gate /* get all the addresses of this host */ 18907c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_os_localaddr 1891505d05c7Sgtb (krb5_context, 1892505d05c7Sgtb krb5_address ***); 18937c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_default_realm 1894505d05c7Sgtb (krb5_context, 1895505d05c7Sgtb char ** ); 18967c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_set_default_realm 1897505d05c7Sgtb (krb5_context, 1898505d05c7Sgtb const char * ); 18997c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_default_realm 1900505d05c7Sgtb (krb5_context, 1901505d05c7Sgtb char * ); 19027c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_sname_to_principal 1903505d05c7Sgtb (krb5_context, 1904505d05c7Sgtb const char *, 1905505d05c7Sgtb const char *, 19067c478bd9Sstevel@tonic-gate krb5_int32, 1907505d05c7Sgtb krb5_principal *); 1908505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1909505d05c7Sgtb krb5_change_password 1910505d05c7Sgtb (krb5_context context, krb5_creds *creds, char *newpw, 1911505d05c7Sgtb int *result_code, krb5_data *result_code_string, 1912505d05c7Sgtb krb5_data *result_string); 1913505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1914505d05c7Sgtb krb5_set_password 1915505d05c7Sgtb (krb5_context context, krb5_creds *creds, char *newpw, krb5_principal change_password_for, 1916505d05c7Sgtb int *result_code, krb5_data *result_code_string, krb5_data *result_string); 1917505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1918505d05c7Sgtb krb5_set_password_using_ccache 1919505d05c7Sgtb (krb5_context context, krb5_ccache ccache, char *newpw, krb5_principal change_password_for, 1920505d05c7Sgtb int *result_code, krb5_data *result_code_string, krb5_data *result_string); 19217c478bd9Sstevel@tonic-gate 1922505d05c7Sgtb #if KRB5_PRIVATE 19237c478bd9Sstevel@tonic-gate krb5_error_code krb5_set_config_files 1924505d05c7Sgtb (krb5_context, const char **); 19257c478bd9Sstevel@tonic-gate 19267c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_default_config_files 1927505d05c7Sgtb (char ***filenames); 19287c478bd9Sstevel@tonic-gate 19297c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_config_files 1930505d05c7Sgtb (char **filenames); 19317c478bd9Sstevel@tonic-gate #endif 19327c478bd9Sstevel@tonic-gate 1933505d05c7Sgtb krb5_error_code KRB5_CALLCONV 1934505d05c7Sgtb krb5_get_profile 1935505d05c7Sgtb (krb5_context, struct _profile_t * /* profile_t */ *); 1936505d05c7Sgtb 1937505d05c7Sgtb #if KRB5_PRIVATE 19387c478bd9Sstevel@tonic-gate krb5_error_code krb5_send_tgs 1939505d05c7Sgtb (krb5_context, 1940505d05c7Sgtb krb5_flags, 1941505d05c7Sgtb const krb5_ticket_times *, 1942505d05c7Sgtb const krb5_enctype *, 1943505d05c7Sgtb krb5_const_principal, 1944505d05c7Sgtb krb5_address * const *, 1945505d05c7Sgtb krb5_authdata * const *, 1946505d05c7Sgtb krb5_pa_data * const *, 1947505d05c7Sgtb const krb5_data *, 1948505d05c7Sgtb krb5_creds *, 1949505d05c7Sgtb krb5_response * ); 1950505d05c7Sgtb #endif 1951505d05c7Sgtb 1952505d05c7Sgtb #if KRB5_DEPRECATED 1953505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_get_in_tkt 1954505d05c7Sgtb (krb5_context, 1955505d05c7Sgtb krb5_flags, 1956505d05c7Sgtb krb5_address * const *, 1957505d05c7Sgtb krb5_enctype *, 1958505d05c7Sgtb krb5_preauthtype *, 1959505d05c7Sgtb krb5_error_code ( * )(krb5_context, 1960505d05c7Sgtb krb5_enctype, 1961505d05c7Sgtb krb5_data *, 1962505d05c7Sgtb krb5_const_pointer, 1963505d05c7Sgtb krb5_keyblock **), 1964505d05c7Sgtb krb5_const_pointer, 1965505d05c7Sgtb krb5_error_code ( * )(krb5_context, 1966505d05c7Sgtb const krb5_keyblock *, 1967505d05c7Sgtb krb5_const_pointer, 1968505d05c7Sgtb krb5_kdc_rep * ), 1969505d05c7Sgtb krb5_const_pointer, 1970505d05c7Sgtb krb5_creds *, 1971505d05c7Sgtb krb5_ccache, 1972505d05c7Sgtb krb5_kdc_rep ** ); 1973505d05c7Sgtb 1974505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password 1975505d05c7Sgtb (krb5_context, 1976505d05c7Sgtb krb5_flags, 1977505d05c7Sgtb krb5_address * const *, 1978505d05c7Sgtb krb5_enctype *, 1979505d05c7Sgtb krb5_preauthtype *, 1980505d05c7Sgtb const char *, 1981505d05c7Sgtb krb5_ccache, 1982505d05c7Sgtb krb5_creds *, 1983505d05c7Sgtb krb5_kdc_rep ** ); 1984505d05c7Sgtb 1985505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey 1986505d05c7Sgtb (krb5_context, 1987505d05c7Sgtb krb5_flags, 1988505d05c7Sgtb krb5_address * const *, 1989505d05c7Sgtb krb5_enctype *, 1990505d05c7Sgtb krb5_preauthtype *, 1991505d05c7Sgtb const krb5_keyblock *, 1992505d05c7Sgtb krb5_ccache, 1993505d05c7Sgtb krb5_creds *, 1994505d05c7Sgtb krb5_kdc_rep ** ); 1995505d05c7Sgtb 1996505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_keytab 1997505d05c7Sgtb (krb5_context, 1998505d05c7Sgtb krb5_flags, 1999505d05c7Sgtb krb5_address * const *, 2000505d05c7Sgtb krb5_enctype *, 2001505d05c7Sgtb krb5_preauthtype *, 2002505d05c7Sgtb krb5_keytab, 2003505d05c7Sgtb krb5_ccache, 2004505d05c7Sgtb krb5_creds *, 2005505d05c7Sgtb krb5_kdc_rep ** ); 2006505d05c7Sgtb #endif /* KRB5_DEPRECATED */ 20077c478bd9Sstevel@tonic-gate 2008505d05c7Sgtb #if KRB5_PRIVATE 20097c478bd9Sstevel@tonic-gate krb5_error_code krb5_decode_kdc_rep 2010505d05c7Sgtb (krb5_context, 2011505d05c7Sgtb krb5_data *, 2012505d05c7Sgtb const krb5_keyblock *, 2013505d05c7Sgtb krb5_kdc_rep ** ); 2014505d05c7Sgtb #endif 20157c478bd9Sstevel@tonic-gate 20167c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_rd_req 2017505d05c7Sgtb (krb5_context, 20187c478bd9Sstevel@tonic-gate krb5_auth_context *, 2019505d05c7Sgtb const krb5_data *, 20207c478bd9Sstevel@tonic-gate krb5_const_principal, 20217c478bd9Sstevel@tonic-gate krb5_keytab, 20227c478bd9Sstevel@tonic-gate krb5_flags *, 2023505d05c7Sgtb krb5_ticket **); 20247c478bd9Sstevel@tonic-gate 2025505d05c7Sgtb #if KRB5_PRIVATE 20267c478bd9Sstevel@tonic-gate krb5_error_code krb5_rd_req_decoded 2027505d05c7Sgtb (krb5_context, 2028505d05c7Sgtb krb5_auth_context *, 2029505d05c7Sgtb const krb5_ap_req *, 2030505d05c7Sgtb krb5_const_principal, 2031505d05c7Sgtb krb5_keytab, 2032505d05c7Sgtb krb5_flags *, 2033505d05c7Sgtb krb5_ticket **); 20347c478bd9Sstevel@tonic-gate 20357c478bd9Sstevel@tonic-gate krb5_error_code krb5_rd_req_decoded_anyflag 2036505d05c7Sgtb (krb5_context, 2037505d05c7Sgtb krb5_auth_context *, 2038505d05c7Sgtb const krb5_ap_req *, 2039505d05c7Sgtb krb5_const_principal, 2040505d05c7Sgtb krb5_keytab, 2041505d05c7Sgtb krb5_flags *, 2042505d05c7Sgtb krb5_ticket **); 2043505d05c7Sgtb #endif 20447c478bd9Sstevel@tonic-gate 20457c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_kt_read_service_key 2046505d05c7Sgtb (krb5_context, 20477c478bd9Sstevel@tonic-gate krb5_pointer, 20487c478bd9Sstevel@tonic-gate krb5_principal, 20497c478bd9Sstevel@tonic-gate krb5_kvno, 20507c478bd9Sstevel@tonic-gate krb5_enctype, 2051505d05c7Sgtb krb5_keyblock **); 20527c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_safe 2053505d05c7Sgtb (krb5_context, 20547c478bd9Sstevel@tonic-gate krb5_auth_context, 2055505d05c7Sgtb const krb5_data *, 20567c478bd9Sstevel@tonic-gate krb5_data *, 2057505d05c7Sgtb krb5_replay_data *); 20587c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_priv 2059505d05c7Sgtb (krb5_context, 20607c478bd9Sstevel@tonic-gate krb5_auth_context, 2061505d05c7Sgtb const krb5_data *, 20627c478bd9Sstevel@tonic-gate krb5_data *, 2063505d05c7Sgtb krb5_replay_data *); 2064505d05c7Sgtb #if KRB5_PRIVATE 20657c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_cc_register 2066505d05c7Sgtb (krb5_context, 20677c478bd9Sstevel@tonic-gate krb5_cc_ops *, 2068505d05c7Sgtb krb5_boolean ); 2069505d05c7Sgtb #endif 20707c478bd9Sstevel@tonic-gate 2071505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_sendauth 2072505d05c7Sgtb (krb5_context, 20737c478bd9Sstevel@tonic-gate krb5_auth_context *, 20747c478bd9Sstevel@tonic-gate krb5_pointer, 20757c478bd9Sstevel@tonic-gate char *, 20767c478bd9Sstevel@tonic-gate krb5_principal, 20777c478bd9Sstevel@tonic-gate krb5_principal, 20787c478bd9Sstevel@tonic-gate krb5_flags, 20797c478bd9Sstevel@tonic-gate krb5_data *, 20807c478bd9Sstevel@tonic-gate krb5_creds *, 20817c478bd9Sstevel@tonic-gate krb5_ccache, 2082505d05c7Sgtb krb5_error **, 2083505d05c7Sgtb krb5_ap_rep_enc_part **, 2084505d05c7Sgtb krb5_creds **); 2085505d05c7Sgtb 20867c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_recvauth 2087505d05c7Sgtb (krb5_context, 20887c478bd9Sstevel@tonic-gate krb5_auth_context *, 20897c478bd9Sstevel@tonic-gate krb5_pointer, 20907c478bd9Sstevel@tonic-gate char *, 20917c478bd9Sstevel@tonic-gate krb5_principal, 2092505d05c7Sgtb krb5_int32, 20937c478bd9Sstevel@tonic-gate krb5_keytab, 2094505d05c7Sgtb krb5_ticket **); 20957c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_recvauth_version 2096505d05c7Sgtb (krb5_context, 20977c478bd9Sstevel@tonic-gate krb5_auth_context *, 20987c478bd9Sstevel@tonic-gate krb5_pointer, 20997c478bd9Sstevel@tonic-gate krb5_principal, 2100505d05c7Sgtb krb5_int32, 21017c478bd9Sstevel@tonic-gate krb5_keytab, 2102505d05c7Sgtb krb5_ticket **, 2103505d05c7Sgtb krb5_data *); 21047c478bd9Sstevel@tonic-gate 2105505d05c7Sgtb #if KRB5_PRIVATE 21067c478bd9Sstevel@tonic-gate krb5_error_code krb5_walk_realm_tree 2107505d05c7Sgtb (krb5_context, 2108505d05c7Sgtb const krb5_data *, 2109505d05c7Sgtb const krb5_data *, 21107c478bd9Sstevel@tonic-gate krb5_principal **, 2111505d05c7Sgtb int); 2112505d05c7Sgtb #endif 21137c478bd9Sstevel@tonic-gate 21147c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_ncred 2115505d05c7Sgtb (krb5_context, 21167c478bd9Sstevel@tonic-gate krb5_auth_context, 2117505d05c7Sgtb krb5_creds **, 2118505d05c7Sgtb krb5_data **, 2119505d05c7Sgtb krb5_replay_data *); 21207c478bd9Sstevel@tonic-gate 21217c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_mk_1cred 2122505d05c7Sgtb (krb5_context, 21237c478bd9Sstevel@tonic-gate krb5_auth_context, 21247c478bd9Sstevel@tonic-gate krb5_creds *, 2125505d05c7Sgtb krb5_data **, 2126505d05c7Sgtb krb5_replay_data *); 21277c478bd9Sstevel@tonic-gate 21287c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_rd_cred 2129505d05c7Sgtb (krb5_context, 21307c478bd9Sstevel@tonic-gate krb5_auth_context, 21317c478bd9Sstevel@tonic-gate krb5_data *, 2132505d05c7Sgtb krb5_creds ***, 2133505d05c7Sgtb krb5_replay_data *); 21347c478bd9Sstevel@tonic-gate 21357c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_fwd_tgt_creds 2136505d05c7Sgtb (krb5_context, 21377c478bd9Sstevel@tonic-gate krb5_auth_context, 21387c478bd9Sstevel@tonic-gate char *, 2139505d05c7Sgtb krb5_principal, 2140505d05c7Sgtb krb5_principal, 21417c478bd9Sstevel@tonic-gate krb5_ccache, 21427c478bd9Sstevel@tonic-gate int forwardable, 2143505d05c7Sgtb krb5_data *); 21447c478bd9Sstevel@tonic-gate 21457c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_init 2146505d05c7Sgtb (krb5_context, 2147505d05c7Sgtb krb5_auth_context *); 21487c478bd9Sstevel@tonic-gate 21497c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_free 2150505d05c7Sgtb (krb5_context, 2151505d05c7Sgtb krb5_auth_context); 21527c478bd9Sstevel@tonic-gate 21537c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_setflags 2154505d05c7Sgtb (krb5_context, 21557c478bd9Sstevel@tonic-gate krb5_auth_context, 2156505d05c7Sgtb krb5_int32); 21577c478bd9Sstevel@tonic-gate 21587c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_getflags 2159505d05c7Sgtb (krb5_context, 21607c478bd9Sstevel@tonic-gate krb5_auth_context, 2161505d05c7Sgtb krb5_int32 *); 21627c478bd9Sstevel@tonic-gate 21637c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 21647c478bd9Sstevel@tonic-gate krb5_auth_con_set_checksum_func (krb5_context, krb5_auth_context, 2165505d05c7Sgtb krb5_mk_req_checksum_func, void *); 21667c478bd9Sstevel@tonic-gate 21677c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 21687c478bd9Sstevel@tonic-gate krb5_auth_con_get_checksum_func( krb5_context, krb5_auth_context, 2169505d05c7Sgtb krb5_mk_req_checksum_func *, void **); 2170505d05c7Sgtb 2171505d05c7Sgtb krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_setaddrs 2172505d05c7Sgtb (krb5_context, 2173505d05c7Sgtb krb5_auth_context, 2174505d05c7Sgtb krb5_address *, 2175505d05c7Sgtb krb5_address *); 2176505d05c7Sgtb 2177505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_auth_con_getaddrs 2178505d05c7Sgtb (krb5_context, 2179505d05c7Sgtb krb5_auth_context, 2180505d05c7Sgtb krb5_address **, 2181505d05c7Sgtb krb5_address **); 2182505d05c7Sgtb 2183505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_auth_con_setports 2184505d05c7Sgtb (krb5_context, 2185505d05c7Sgtb krb5_auth_context, 2186505d05c7Sgtb krb5_address *, 2187505d05c7Sgtb krb5_address *); 21887c478bd9Sstevel@tonic-gate 21897c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_setuseruserkey 2190505d05c7Sgtb (krb5_context, 21917c478bd9Sstevel@tonic-gate krb5_auth_context, 2192505d05c7Sgtb krb5_keyblock *); 21937c478bd9Sstevel@tonic-gate 21947c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_getkey 2195505d05c7Sgtb (krb5_context, 21967c478bd9Sstevel@tonic-gate krb5_auth_context, 2197505d05c7Sgtb krb5_keyblock **); 21987c478bd9Sstevel@tonic-gate 21997c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_getsendsubkey( 22007c478bd9Sstevel@tonic-gate krb5_context, krb5_auth_context, krb5_keyblock **); 22017c478bd9Sstevel@tonic-gate 22027c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_getrecvsubkey( 22037c478bd9Sstevel@tonic-gate krb5_context, krb5_auth_context, krb5_keyblock **); 22047c478bd9Sstevel@tonic-gate 22057c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_setsendsubkey( 22067c478bd9Sstevel@tonic-gate krb5_context, krb5_auth_context, krb5_keyblock *); 22077c478bd9Sstevel@tonic-gate 22087c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_setrecvsubkey( 22097c478bd9Sstevel@tonic-gate krb5_context, krb5_auth_context, krb5_keyblock *); 22107c478bd9Sstevel@tonic-gate 2211505d05c7Sgtb #if KRB5_DEPRECATED 22127c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalsubkey 2213505d05c7Sgtb (krb5_context, 22147c478bd9Sstevel@tonic-gate krb5_auth_context, 2215505d05c7Sgtb krb5_keyblock **); 22167c478bd9Sstevel@tonic-gate 2217505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_auth_con_getremotesubkey 2218505d05c7Sgtb (krb5_context, 2219505d05c7Sgtb krb5_auth_context, 2220505d05c7Sgtb krb5_keyblock **); 2221505d05c7Sgtb #endif 2222505d05c7Sgtb 2223505d05c7Sgtb #if KRB5_PRIVATE 22247c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_set_req_cksumtype 2225505d05c7Sgtb (krb5_context, 22267c478bd9Sstevel@tonic-gate krb5_auth_context, 2227505d05c7Sgtb krb5_cksumtype); 22287c478bd9Sstevel@tonic-gate 22297c478bd9Sstevel@tonic-gate krb5_error_code krb5_auth_con_set_safe_cksumtype 2230505d05c7Sgtb (krb5_context, 2231505d05c7Sgtb krb5_auth_context, 2232505d05c7Sgtb krb5_cksumtype); 2233505d05c7Sgtb #endif 22347c478bd9Sstevel@tonic-gate 22357c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalseqnumber 2236505d05c7Sgtb (krb5_context, 22377c478bd9Sstevel@tonic-gate krb5_auth_context, 2238505d05c7Sgtb krb5_int32 *); 22397c478bd9Sstevel@tonic-gate 22407c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_getremoteseqnumber 2241505d05c7Sgtb (krb5_context, 22427c478bd9Sstevel@tonic-gate krb5_auth_context, 2243505d05c7Sgtb krb5_int32 *); 22447c478bd9Sstevel@tonic-gate 2245505d05c7Sgtb #if KRB5_DEPRECATED 2246505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_auth_con_initivector 2247505d05c7Sgtb (krb5_context, 2248505d05c7Sgtb krb5_auth_context); 2249505d05c7Sgtb #endif 22507c478bd9Sstevel@tonic-gate 2251505d05c7Sgtb #if KRB5_PRIVATE 22527c478bd9Sstevel@tonic-gate krb5_error_code krb5_auth_con_setivector 2253505d05c7Sgtb (krb5_context, 2254505d05c7Sgtb krb5_auth_context, 2255505d05c7Sgtb krb5_pointer); 22567c478bd9Sstevel@tonic-gate 22577c478bd9Sstevel@tonic-gate krb5_error_code krb5_auth_con_getivector 2258505d05c7Sgtb (krb5_context, 2259505d05c7Sgtb krb5_auth_context, 2260505d05c7Sgtb krb5_pointer *); 2261505d05c7Sgtb #endif 22627c478bd9Sstevel@tonic-gate 22637c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_setrcache 2264505d05c7Sgtb (krb5_context, 22657c478bd9Sstevel@tonic-gate krb5_auth_context, 2266505d05c7Sgtb krb5_rcache); 22677c478bd9Sstevel@tonic-gate 2268505d05c7Sgtb krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_getrcache 2269505d05c7Sgtb (krb5_context, 22707c478bd9Sstevel@tonic-gate krb5_auth_context, 2271505d05c7Sgtb krb5_rcache *); 22727c478bd9Sstevel@tonic-gate 2273505d05c7Sgtb #if KRB5_PRIVATE 2274505d05c7Sgtb krb5_error_code krb5_auth_con_setpermetypes 2275505d05c7Sgtb (krb5_context, 2276505d05c7Sgtb krb5_auth_context, 2277505d05c7Sgtb const krb5_enctype *); 2278505d05c7Sgtb 2279505d05c7Sgtb krb5_error_code krb5_auth_con_getpermetypes 2280505d05c7Sgtb (krb5_context, 2281505d05c7Sgtb krb5_auth_context, 2282505d05c7Sgtb krb5_enctype **); 2283505d05c7Sgtb #endif 2284505d05c7Sgtb 2285505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_auth_con_getauthenticator 2286505d05c7Sgtb (krb5_context, 22877c478bd9Sstevel@tonic-gate krb5_auth_context, 2288505d05c7Sgtb krb5_authenticator **); 22897c478bd9Sstevel@tonic-gate 22907c478bd9Sstevel@tonic-gate #define KRB5_REALM_BRANCH_CHAR '.' 22917c478bd9Sstevel@tonic-gate 22927c478bd9Sstevel@tonic-gate /* 22937c478bd9Sstevel@tonic-gate * end "func-proto.h" 22947c478bd9Sstevel@tonic-gate */ 22957c478bd9Sstevel@tonic-gate 22967c478bd9Sstevel@tonic-gate /* 22977c478bd9Sstevel@tonic-gate * begin stuff from libos.h 22987c478bd9Sstevel@tonic-gate */ 22997c478bd9Sstevel@tonic-gate 2300505d05c7Sgtb 2301505d05c7Sgtb #if KRB5_PRIVATE 2302505d05c7Sgtb krb5_error_code krb5_read_message (krb5_context, krb5_pointer, krb5_data *); 2303505d05c7Sgtb krb5_error_code krb5_write_message (krb5_context, krb5_pointer, krb5_data *); 2304505d05c7Sgtb int krb5_net_read (krb5_context, int , char *, int); 2305505d05c7Sgtb int krb5_net_write (krb5_context, int , const char *, int); 2306505d05c7Sgtb #endif 2307505d05c7Sgtb 23087c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_read_password 2309505d05c7Sgtb (krb5_context, 23107c478bd9Sstevel@tonic-gate const char *, 23117c478bd9Sstevel@tonic-gate const char *, 23127c478bd9Sstevel@tonic-gate char *, 2313505d05c7Sgtb unsigned int * ); 2314505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_aname_to_localname 2315505d05c7Sgtb (krb5_context, 23167c478bd9Sstevel@tonic-gate krb5_const_principal, 2317505d05c7Sgtb int, 2318505d05c7Sgtb char * ); 23197c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_host_realm 2320505d05c7Sgtb (krb5_context, 23217c478bd9Sstevel@tonic-gate const char *, 2322505d05c7Sgtb char *** ); 23237c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_free_host_realm 2324505d05c7Sgtb (krb5_context, 2325505d05c7Sgtb char * const * ); 2326505d05c7Sgtb #if KRB5_PRIVATE 23277c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_get_realm_domain 2328505d05c7Sgtb (krb5_context, 23297c478bd9Sstevel@tonic-gate const char *, 2330505d05c7Sgtb char ** ); 2331505d05c7Sgtb #endif 2332505d05c7Sgtb krb5_boolean KRB5_CALLCONV krb5_kuserok 2333505d05c7Sgtb (krb5_context, 2334505d05c7Sgtb krb5_principal, const char *); 23357c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_auth_con_genaddrs 2336505d05c7Sgtb (krb5_context, 23377c478bd9Sstevel@tonic-gate krb5_auth_context, 2338505d05c7Sgtb int, int); 2339505d05c7Sgtb #if KRB5_PRIVATE 23407c478bd9Sstevel@tonic-gate krb5_error_code krb5_gen_portaddr 2341505d05c7Sgtb (krb5_context, 23427c478bd9Sstevel@tonic-gate const krb5_address *, 23437c478bd9Sstevel@tonic-gate krb5_const_pointer, 2344505d05c7Sgtb krb5_address **); 2345505d05c7Sgtb krb5_error_code krb5_gen_replay_name 2346505d05c7Sgtb (krb5_context, 2347505d05c7Sgtb const krb5_address *, 2348505d05c7Sgtb const char *, 2349505d05c7Sgtb char **); 23507c478bd9Sstevel@tonic-gate krb5_error_code krb5_make_fulladdr 2351505d05c7Sgtb (krb5_context, 23527c478bd9Sstevel@tonic-gate krb5_address *, 23537c478bd9Sstevel@tonic-gate krb5_address *, 2354505d05c7Sgtb krb5_address *); 2355505d05c7Sgtb #endif 23567c478bd9Sstevel@tonic-gate 2357505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_set_real_time 2358505d05c7Sgtb (krb5_context, krb5_int32, krb5_int32); 23597c478bd9Sstevel@tonic-gate 2360505d05c7Sgtb #if KRB5_PRIVATE 23617c478bd9Sstevel@tonic-gate krb5_error_code krb5_set_debugging_time 2362505d05c7Sgtb (krb5_context, krb5_int32, krb5_int32); 23637c478bd9Sstevel@tonic-gate krb5_error_code krb5_use_natural_time 2364505d05c7Sgtb (krb5_context); 2365505d05c7Sgtb #endif 2366505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_get_time_offsets 2367505d05c7Sgtb (krb5_context, krb5_int32 *, krb5_int32 *); 2368505d05c7Sgtb #if KRB5_PRIVATE 23697c478bd9Sstevel@tonic-gate krb5_error_code krb5_set_time_offsets 2370505d05c7Sgtb (krb5_context, krb5_int32, krb5_int32); 2371505d05c7Sgtb #endif 23727c478bd9Sstevel@tonic-gate 23737c478bd9Sstevel@tonic-gate /* str_conv.c */ 23747c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_string_to_enctype 2375505d05c7Sgtb (char *, krb5_enctype *); 23767c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_string_to_salttype 2377505d05c7Sgtb (char *, krb5_int32 *); 23787c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_string_to_cksumtype 2379505d05c7Sgtb (char *, krb5_cksumtype *); 23807c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_string_to_timestamp 2381505d05c7Sgtb (char *, krb5_timestamp *); 23827c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_string_to_deltat 2383505d05c7Sgtb (char *, krb5_deltat *); 23847c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_enctype_to_string 2385505d05c7Sgtb (krb5_enctype, char *, size_t); 23867c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_salttype_to_string 2387505d05c7Sgtb (krb5_int32, char *, size_t); 23887c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_cksumtype_to_string 2389505d05c7Sgtb (krb5_cksumtype, char *, size_t); 23907c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_timestamp_to_string 2391505d05c7Sgtb (krb5_timestamp, char *, size_t); 23927c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_timestamp_to_sfstring 2393505d05c7Sgtb (krb5_timestamp, char *, size_t, char *); 23947c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_deltat_to_string 2395505d05c7Sgtb (krb5_deltat, char *, size_t); 2396505d05c7Sgtb 23977c478bd9Sstevel@tonic-gate 23987c478bd9Sstevel@tonic-gate /* 23997c478bd9Sstevel@tonic-gate * end stuff from libos.h 24007c478bd9Sstevel@tonic-gate */ 24017c478bd9Sstevel@tonic-gate 24027c478bd9Sstevel@tonic-gate /* 24037c478bd9Sstevel@tonic-gate * begin "k5-free.h" 24047c478bd9Sstevel@tonic-gate */ 24057c478bd9Sstevel@tonic-gate 24067c478bd9Sstevel@tonic-gate /* to keep lint happy */ 24077c478bd9Sstevel@tonic-gate #ifdef _KERNEL 24087c478bd9Sstevel@tonic-gate #define krb5_xfree_wrap(val,n) kmem_free((char *)(val),n) 24097c478bd9Sstevel@tonic-gate #else 24107c478bd9Sstevel@tonic-gate #define krb5_xfree_wrap(val,n) free((char *)(val)) 24117c478bd9Sstevel@tonic-gate #define krb5_xfree(val) free((char *)(val)) 24127c478bd9Sstevel@tonic-gate #endif 24137c478bd9Sstevel@tonic-gate 24147c478bd9Sstevel@tonic-gate /* 24157c478bd9Sstevel@tonic-gate * end "k5-free.h" 24167c478bd9Sstevel@tonic-gate */ 24177c478bd9Sstevel@tonic-gate 24187c478bd9Sstevel@tonic-gate /* The name of the Kerberos ticket granting service... and its size */ 24197c478bd9Sstevel@tonic-gate #define KRB5_TGS_NAME "krbtgt" 24207c478bd9Sstevel@tonic-gate #define KRB5_TGS_NAME_SIZE 6 24217c478bd9Sstevel@tonic-gate 24227c478bd9Sstevel@tonic-gate /* flags for recvauth */ 24237c478bd9Sstevel@tonic-gate #define KRB5_RECVAUTH_SKIP_VERSION 0x0001 24247c478bd9Sstevel@tonic-gate #define KRB5_RECVAUTH_BADAUTHVERS 0x0002 24257c478bd9Sstevel@tonic-gate 24267c478bd9Sstevel@tonic-gate /* initial ticket api functions */ 24277c478bd9Sstevel@tonic-gate 24287c478bd9Sstevel@tonic-gate typedef struct _krb5_prompt { 24297c478bd9Sstevel@tonic-gate char *prompt; 24307c478bd9Sstevel@tonic-gate int hidden; 24317c478bd9Sstevel@tonic-gate krb5_data *reply; 24327c478bd9Sstevel@tonic-gate } krb5_prompt; 24337c478bd9Sstevel@tonic-gate 24347c478bd9Sstevel@tonic-gate typedef krb5_error_code (KRB5_CALLCONV *krb5_prompter_fct)(krb5_context context, 24357c478bd9Sstevel@tonic-gate void *data, 24367c478bd9Sstevel@tonic-gate const char *name, 24377c478bd9Sstevel@tonic-gate const char *banner, 24387c478bd9Sstevel@tonic-gate int num_prompts, 24397c478bd9Sstevel@tonic-gate krb5_prompt prompts[]); 24407c478bd9Sstevel@tonic-gate 24417c478bd9Sstevel@tonic-gate 24427c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 24437c478bd9Sstevel@tonic-gate krb5_prompter_posix 2444505d05c7Sgtb (krb5_context context, 24457c478bd9Sstevel@tonic-gate void *data, 24467c478bd9Sstevel@tonic-gate const char *name, 24477c478bd9Sstevel@tonic-gate const char *banner, 24487c478bd9Sstevel@tonic-gate int num_prompts, 2449505d05c7Sgtb krb5_prompt prompts[]); 24507c478bd9Sstevel@tonic-gate 24517c478bd9Sstevel@tonic-gate typedef struct _krb5_get_init_creds_opt { 24527c478bd9Sstevel@tonic-gate krb5_flags flags; 24537c478bd9Sstevel@tonic-gate krb5_deltat tkt_life; 24547c478bd9Sstevel@tonic-gate krb5_deltat renew_life; 24557c478bd9Sstevel@tonic-gate int forwardable; 24567c478bd9Sstevel@tonic-gate int proxiable; 24577c478bd9Sstevel@tonic-gate krb5_enctype *etype_list; 24587c478bd9Sstevel@tonic-gate int etype_list_length; 24597c478bd9Sstevel@tonic-gate krb5_address **address_list; 24607c478bd9Sstevel@tonic-gate krb5_preauthtype *preauth_list; 24617c478bd9Sstevel@tonic-gate int preauth_list_length; 24627c478bd9Sstevel@tonic-gate krb5_data *salt; 24637c478bd9Sstevel@tonic-gate } krb5_get_init_creds_opt; 24647c478bd9Sstevel@tonic-gate 24657c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_TKT_LIFE 0x0001 24667c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE 0x0002 24677c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_FORWARDABLE 0x0004 24687c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_PROXIABLE 0x0008 24697c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST 0x0010 24707c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST 0x0020 24717c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST 0x0040 24727c478bd9Sstevel@tonic-gate #define KRB5_GET_INIT_CREDS_OPT_SALT 0x0080 24737c478bd9Sstevel@tonic-gate 24747c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 24757c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_init 2476505d05c7Sgtb (krb5_get_init_creds_opt *opt); 24777c478bd9Sstevel@tonic-gate 24787c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 24797c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_tkt_life 2480505d05c7Sgtb (krb5_get_init_creds_opt *opt, 2481505d05c7Sgtb krb5_deltat tkt_life); 24827c478bd9Sstevel@tonic-gate 24837c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 24847c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_renew_life 2485505d05c7Sgtb (krb5_get_init_creds_opt *opt, 2486505d05c7Sgtb krb5_deltat renew_life); 24877c478bd9Sstevel@tonic-gate 24887c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 24897c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_forwardable 2490505d05c7Sgtb (krb5_get_init_creds_opt *opt, 2491505d05c7Sgtb int forwardable); 24927c478bd9Sstevel@tonic-gate 24937c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 24947c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_proxiable 2495505d05c7Sgtb (krb5_get_init_creds_opt *opt, 2496505d05c7Sgtb int proxiable); 24977c478bd9Sstevel@tonic-gate 24987c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 24997c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_etype_list 2500505d05c7Sgtb (krb5_get_init_creds_opt *opt, 25017c478bd9Sstevel@tonic-gate krb5_enctype *etype_list, 2502505d05c7Sgtb int etype_list_length); 25037c478bd9Sstevel@tonic-gate 25047c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 25057c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_address_list 2506505d05c7Sgtb (krb5_get_init_creds_opt *opt, 2507505d05c7Sgtb krb5_address **addresses); 25087c478bd9Sstevel@tonic-gate 25097c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 25107c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_preauth_list 2511505d05c7Sgtb (krb5_get_init_creds_opt *opt, 25127c478bd9Sstevel@tonic-gate krb5_preauthtype *preauth_list, 2513505d05c7Sgtb int preauth_list_length); 25147c478bd9Sstevel@tonic-gate 25157c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 25167c478bd9Sstevel@tonic-gate krb5_get_init_creds_opt_set_salt 2517505d05c7Sgtb (krb5_get_init_creds_opt *opt, 2518505d05c7Sgtb krb5_data *salt); 2519505d05c7Sgtb 2520505d05c7Sgtb 25217c478bd9Sstevel@tonic-gate 25227c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 25237c478bd9Sstevel@tonic-gate krb5_get_init_creds_password 2524505d05c7Sgtb (krb5_context context, 25257c478bd9Sstevel@tonic-gate krb5_creds *creds, 25267c478bd9Sstevel@tonic-gate krb5_principal client, 25277c478bd9Sstevel@tonic-gate char *password, 25287c478bd9Sstevel@tonic-gate krb5_prompter_fct prompter, 25297c478bd9Sstevel@tonic-gate void *data, 25307c478bd9Sstevel@tonic-gate krb5_deltat start_time, 25317c478bd9Sstevel@tonic-gate char *in_tkt_service, 2532505d05c7Sgtb krb5_get_init_creds_opt *k5_gic_options); 25337c478bd9Sstevel@tonic-gate 25347c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 25357c478bd9Sstevel@tonic-gate krb5_get_init_creds_keytab 2536505d05c7Sgtb (krb5_context context, 25377c478bd9Sstevel@tonic-gate krb5_creds *creds, 25387c478bd9Sstevel@tonic-gate krb5_principal client, 25397c478bd9Sstevel@tonic-gate krb5_keytab arg_keytab, 25407c478bd9Sstevel@tonic-gate krb5_deltat start_time, 25417c478bd9Sstevel@tonic-gate char *in_tkt_service, 2542505d05c7Sgtb krb5_get_init_creds_opt *k5_gic_options); 25437c478bd9Sstevel@tonic-gate 25447c478bd9Sstevel@tonic-gate typedef struct _krb5_verify_init_creds_opt { 25457c478bd9Sstevel@tonic-gate krb5_flags flags; 25467c478bd9Sstevel@tonic-gate int ap_req_nofail; 25477c478bd9Sstevel@tonic-gate } krb5_verify_init_creds_opt; 25487c478bd9Sstevel@tonic-gate 2549505d05c7Sgtb #define KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL 0x0001 25507c478bd9Sstevel@tonic-gate 25517c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 25527c478bd9Sstevel@tonic-gate krb5_verify_init_creds_opt_init 2553505d05c7Sgtb (krb5_verify_init_creds_opt *k5_vic_options); 25547c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 25557c478bd9Sstevel@tonic-gate krb5_verify_init_creds_opt_set_ap_req_nofail 2556505d05c7Sgtb (krb5_verify_init_creds_opt *k5_vic_options, 2557505d05c7Sgtb int ap_req_nofail); 25587c478bd9Sstevel@tonic-gate 25597c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 25607c478bd9Sstevel@tonic-gate krb5_verify_init_creds 2561505d05c7Sgtb (krb5_context context, 25627c478bd9Sstevel@tonic-gate krb5_creds *creds, 25637c478bd9Sstevel@tonic-gate krb5_principal ap_req_server, 25647c478bd9Sstevel@tonic-gate krb5_keytab ap_req_keytab, 25657c478bd9Sstevel@tonic-gate krb5_ccache *ccache, 2566505d05c7Sgtb krb5_verify_init_creds_opt *k5_vic_options); 25677c478bd9Sstevel@tonic-gate 25687c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 25697c478bd9Sstevel@tonic-gate krb5_get_validated_creds 2570505d05c7Sgtb (krb5_context context, 25717c478bd9Sstevel@tonic-gate krb5_creds *creds, 25727c478bd9Sstevel@tonic-gate krb5_principal client, 25737c478bd9Sstevel@tonic-gate krb5_ccache ccache, 2574505d05c7Sgtb char *in_tkt_service); 25757c478bd9Sstevel@tonic-gate 25767c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 25777c478bd9Sstevel@tonic-gate krb5_get_renewed_creds 2578505d05c7Sgtb (krb5_context context, 25797c478bd9Sstevel@tonic-gate krb5_creds *creds, 25807c478bd9Sstevel@tonic-gate krb5_principal client, 25817c478bd9Sstevel@tonic-gate krb5_ccache ccache, 2582505d05c7Sgtb char *in_tkt_service); 25837c478bd9Sstevel@tonic-gate 25847c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV 25857c478bd9Sstevel@tonic-gate krb5_decode_ticket 2586505d05c7Sgtb (const krb5_data *code, 2587505d05c7Sgtb krb5_ticket **rep); 25887c478bd9Sstevel@tonic-gate 25897c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 25907c478bd9Sstevel@tonic-gate krb5_appdefault_string 2591505d05c7Sgtb (krb5_context context, 2592505d05c7Sgtb const char *appname, 2593505d05c7Sgtb const krb5_data *realm, 2594505d05c7Sgtb const char *option, 25957c478bd9Sstevel@tonic-gate const char *default_value, 2596505d05c7Sgtb char ** ret_value); 25977c478bd9Sstevel@tonic-gate 25987c478bd9Sstevel@tonic-gate void KRB5_CALLCONV 25997c478bd9Sstevel@tonic-gate krb5_appdefault_boolean 2600505d05c7Sgtb (krb5_context context, 2601505d05c7Sgtb const char *appname, 2602505d05c7Sgtb const krb5_data *realm, 2603505d05c7Sgtb const char *option, 26047c478bd9Sstevel@tonic-gate int default_value, 2605505d05c7Sgtb int *ret_value); 26067c478bd9Sstevel@tonic-gate 2607505d05c7Sgtb #if KRB5_PRIVATE 26087c478bd9Sstevel@tonic-gate /* 26097c478bd9Sstevel@tonic-gate * The realm iterator functions 26107c478bd9Sstevel@tonic-gate */ 26117c478bd9Sstevel@tonic-gate 26127c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_realm_iterator_create 2613505d05c7Sgtb (krb5_context context, void **iter_p); 26147c478bd9Sstevel@tonic-gate 26157c478bd9Sstevel@tonic-gate krb5_error_code KRB5_CALLCONV krb5_realm_iterator 2616505d05c7Sgtb (krb5_context context, void **iter_p, char **ret_realm); 26177c478bd9Sstevel@tonic-gate 26187c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_realm_iterator_free 2619505d05c7Sgtb (krb5_context context, void **iter_p); 26207c478bd9Sstevel@tonic-gate 26217c478bd9Sstevel@tonic-gate void KRB5_CALLCONV krb5_free_realm_string 2622505d05c7Sgtb (krb5_context context, char *str); 2623505d05c7Sgtb #endif 2624505d05c7Sgtb 2625505d05c7Sgtb /* 2626505d05c7Sgtb * The realm iterator functions 2627505d05c7Sgtb */ 2628505d05c7Sgtb 2629505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_realm_iterator_create 2630505d05c7Sgtb (krb5_context context, void **iter_p); 2631505d05c7Sgtb 2632505d05c7Sgtb krb5_error_code KRB5_CALLCONV krb5_realm_iterator 2633505d05c7Sgtb (krb5_context context, void **iter_p, char **ret_realm); 2634505d05c7Sgtb 2635505d05c7Sgtb void KRB5_CALLCONV krb5_realm_iterator_free 2636505d05c7Sgtb (krb5_context context, void **iter_p); 2637505d05c7Sgtb 2638505d05c7Sgtb void KRB5_CALLCONV krb5_free_realm_string 2639505d05c7Sgtb (krb5_context context, char *str); 26407c478bd9Sstevel@tonic-gate 26417c478bd9Sstevel@tonic-gate /* 26427c478bd9Sstevel@tonic-gate * Prompter enhancements 26437c478bd9Sstevel@tonic-gate */ 26447c478bd9Sstevel@tonic-gate 26457c478bd9Sstevel@tonic-gate #define KRB5_PROMPT_TYPE_PASSWORD 0x1 26467c478bd9Sstevel@tonic-gate #define KRB5_PROMPT_TYPE_NEW_PASSWORD 0x2 26477c478bd9Sstevel@tonic-gate #define KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN 0x3 26487c478bd9Sstevel@tonic-gate #define KRB5_PROMPT_TYPE_PREAUTH 0x4 26497c478bd9Sstevel@tonic-gate 26507c478bd9Sstevel@tonic-gate typedef krb5_int32 krb5_prompt_type; 26517c478bd9Sstevel@tonic-gate 26527c478bd9Sstevel@tonic-gate krb5_prompt_type* KRB5_CALLCONV krb5_get_prompt_types 26537c478bd9Sstevel@tonic-gate (krb5_context context); 26547c478bd9Sstevel@tonic-gate 2655505d05c7Sgtb #if TARGET_OS_MAC 2656505d05c7Sgtb # pragma options align=reset 2657505d05c7Sgtb #endif /* KRB5INT_END_DECLS */ 2658505d05c7Sgtb 2659505d05c7Sgtb /* Don't use this! We're going to phase it out. It's just here to keep 2660505d05c7Sgtb applications from breaking right away. */ 2661505d05c7Sgtb #define krb5_const const 2662505d05c7Sgtb 26637c478bd9Sstevel@tonic-gate #endif /* KRB5_GENERAL__ */ 26647c478bd9Sstevel@tonic-gate 26657c478bd9Sstevel@tonic-gate 26667c478bd9Sstevel@tonic-gate /* 26677c478bd9Sstevel@tonic-gate * krb5_err.h: 26687c478bd9Sstevel@tonic-gate * This file is automatically generated; please do not edit it. 26697c478bd9Sstevel@tonic-gate */ 26707c478bd9Sstevel@tonic-gate 26717c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_NONE (-1765328384L) 26727c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_NAME_EXP (-1765328383L) 26737c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_SERVICE_EXP (-1765328382L) 26747c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_BAD_PVNO (-1765328381L) 26757c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_C_OLD_MAST_KVNO (-1765328380L) 26767c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_S_OLD_MAST_KVNO (-1765328379L) 26777c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN (-1765328378L) 26787c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN (-1765328377L) 26797c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE (-1765328376L) 26807c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_NULL_KEY (-1765328375L) 26817c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_CANNOT_POSTDATE (-1765328374L) 26827c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_NEVER_VALID (-1765328373L) 26837c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_POLICY (-1765328372L) 26847c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_BADOPTION (-1765328371L) 26857c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_ETYPE_NOSUPP (-1765328370L) 26867c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_SUMTYPE_NOSUPP (-1765328369L) 26877c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_PADATA_TYPE_NOSUPP (-1765328368L) 26887c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_TRTYPE_NOSUPP (-1765328367L) 26897c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_CLIENT_REVOKED (-1765328366L) 26907c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_SERVICE_REVOKED (-1765328365L) 26917c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_TGT_REVOKED (-1765328364L) 26927c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_CLIENT_NOTYET (-1765328363L) 26937c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_SERVICE_NOTYET (-1765328362L) 26947c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_KEY_EXP (-1765328361L) 26957c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_PREAUTH_FAILED (-1765328360L) 26967c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_PREAUTH_REQUIRED (-1765328359L) 26977c478bd9Sstevel@tonic-gate #define KRB5KDC_ERR_SERVER_NOMATCH (-1765328358L) 26987c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_27 (-1765328357L) 26997c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_28 (-1765328356L) 27007c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_29 (-1765328355L) 27017c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_30 (-1765328354L) 27027c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BAD_INTEGRITY (-1765328353L) 27037c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_TKT_EXPIRED (-1765328352L) 27047c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_TKT_NYV (-1765328351L) 27057c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_REPEAT (-1765328350L) 27067c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_NOT_US (-1765328349L) 27077c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BADMATCH (-1765328348L) 27087c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_SKEW (-1765328347L) 27097c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BADADDR (-1765328346L) 27107c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BADVERSION (-1765328345L) 27117c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_MSG_TYPE (-1765328344L) 27127c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_MODIFIED (-1765328343L) 27137c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BADORDER (-1765328342L) 27147c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_ILL_CR_TKT (-1765328341L) 27157c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BADKEYVER (-1765328340L) 27167c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_NOKEY (-1765328339L) 27177c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_MUT_FAIL (-1765328338L) 27187c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BADDIRECTION (-1765328337L) 27197c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_METHOD (-1765328336L) 27207c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_BADSEQ (-1765328335L) 27217c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_INAPP_CKSUM (-1765328334L) 27227c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_51 (-1765328333L) 27237c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_52 (-1765328332L) 27247c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_53 (-1765328331L) 27257c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_54 (-1765328330L) 27267c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_55 (-1765328329L) 27277c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_56 (-1765328328L) 27287c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_57 (-1765328327L) 27297c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_58 (-1765328326L) 27307c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_59 (-1765328325L) 27317c478bd9Sstevel@tonic-gate #define KRB5KRB_ERR_GENERIC (-1765328324L) 27327c478bd9Sstevel@tonic-gate #define KRB5KRB_ERR_FIELD_TOOLONG (-1765328323L) 27337c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_62 (-1765328322L) 27347c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_63 (-1765328321L) 27357c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_64 (-1765328320L) 27367c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_65 (-1765328319L) 27377c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_66 (-1765328318L) 27387c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_67 (-1765328317L) 27397c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_68 (-1765328316L) 27407c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_69 (-1765328315L) 27417c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_70 (-1765328314L) 27427c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_71 (-1765328313L) 27437c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_72 (-1765328312L) 27447c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_73 (-1765328311L) 27457c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_74 (-1765328310L) 27467c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_75 (-1765328309L) 27477c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_76 (-1765328308L) 27487c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_77 (-1765328307L) 27497c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_78 (-1765328306L) 27507c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_79 (-1765328305L) 27517c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_80 (-1765328304L) 27527c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_81 (-1765328303L) 27537c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_82 (-1765328302L) 27547c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_83 (-1765328301L) 27557c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_84 (-1765328300L) 27567c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_85 (-1765328299L) 27577c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_86 (-1765328298L) 27587c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_87 (-1765328297L) 27597c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_88 (-1765328296L) 27607c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_89 (-1765328295L) 27617c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_90 (-1765328294L) 27627c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_91 (-1765328293L) 27637c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_92 (-1765328292L) 27647c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_93 (-1765328291L) 27657c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_94 (-1765328290L) 27667c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_95 (-1765328289L) 27677c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_96 (-1765328288L) 27687c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_97 (-1765328287L) 27697c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_98 (-1765328286L) 27707c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_99 (-1765328285L) 27717c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_100 (-1765328284L) 27727c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_101 (-1765328283L) 27737c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_102 (-1765328282L) 27747c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_103 (-1765328281L) 27757c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_104 (-1765328280L) 27767c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_105 (-1765328279L) 27777c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_106 (-1765328278L) 27787c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_107 (-1765328277L) 27797c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_108 (-1765328276L) 27807c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_109 (-1765328275L) 27817c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_110 (-1765328274L) 27827c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_111 (-1765328273L) 27837c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_112 (-1765328272L) 27847c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_113 (-1765328271L) 27857c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_114 (-1765328270L) 27867c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_115 (-1765328269L) 27877c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_116 (-1765328268L) 27887c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_117 (-1765328267L) 27897c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_118 (-1765328266L) 27907c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_119 (-1765328265L) 27917c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_120 (-1765328264L) 27927c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_121 (-1765328263L) 27937c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_122 (-1765328262L) 27947c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_123 (-1765328261L) 27957c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_124 (-1765328260L) 27967c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_125 (-1765328259L) 27977c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_126 (-1765328258L) 27987c478bd9Sstevel@tonic-gate #define KRB5PLACEHOLD_127 (-1765328257L) 27997c478bd9Sstevel@tonic-gate #define KRB5_ERR_RCSID (-1765328256L) 28007c478bd9Sstevel@tonic-gate #define KRB5_LIBOS_BADLOCKFLAG (-1765328255L) 28017c478bd9Sstevel@tonic-gate #define KRB5_LIBOS_CANTREADPWD (-1765328254L) 28027c478bd9Sstevel@tonic-gate #define KRB5_LIBOS_BADPWDMATCH (-1765328253L) 28037c478bd9Sstevel@tonic-gate #define KRB5_LIBOS_PWDINTR (-1765328252L) 28047c478bd9Sstevel@tonic-gate #define KRB5_PARSE_ILLCHAR (-1765328251L) 28057c478bd9Sstevel@tonic-gate #define KRB5_PARSE_MALFORMED (-1765328250L) 28067c478bd9Sstevel@tonic-gate #define KRB5_CONFIG_CANTOPEN (-1765328249L) 28077c478bd9Sstevel@tonic-gate #define KRB5_CONFIG_BADFORMAT (-1765328248L) 28087c478bd9Sstevel@tonic-gate #define KRB5_CONFIG_NOTENUFSPACE (-1765328247L) 28097c478bd9Sstevel@tonic-gate #define KRB5_BADMSGTYPE (-1765328246L) 28107c478bd9Sstevel@tonic-gate #define KRB5_CC_BADNAME (-1765328245L) 28117c478bd9Sstevel@tonic-gate #define KRB5_CC_UNKNOWN_TYPE (-1765328244L) 28127c478bd9Sstevel@tonic-gate #define KRB5_CC_NOTFOUND (-1765328243L) 28137c478bd9Sstevel@tonic-gate #define KRB5_CC_END (-1765328242L) 28147c478bd9Sstevel@tonic-gate #define KRB5_NO_TKT_SUPPLIED (-1765328241L) 28157c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_WRONG_PRINC (-1765328240L) 28167c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_TKT_INVALID (-1765328239L) 28177c478bd9Sstevel@tonic-gate #define KRB5_PRINC_NOMATCH (-1765328238L) 28187c478bd9Sstevel@tonic-gate #define KRB5_KDCREP_MODIFIED (-1765328237L) 28197c478bd9Sstevel@tonic-gate #define KRB5_KDCREP_SKEW (-1765328236L) 28207c478bd9Sstevel@tonic-gate #define KRB5_IN_TKT_REALM_MISMATCH (-1765328235L) 28217c478bd9Sstevel@tonic-gate #define KRB5_PROG_ETYPE_NOSUPP (-1765328234L) 28227c478bd9Sstevel@tonic-gate #define KRB5_PROG_KEYTYPE_NOSUPP (-1765328233L) 28237c478bd9Sstevel@tonic-gate #define KRB5_WRONG_ETYPE (-1765328232L) 28247c478bd9Sstevel@tonic-gate #define KRB5_PROG_SUMTYPE_NOSUPP (-1765328231L) 28257c478bd9Sstevel@tonic-gate #define KRB5_REALM_UNKNOWN (-1765328230L) 28267c478bd9Sstevel@tonic-gate #define KRB5_SERVICE_UNKNOWN (-1765328229L) 28277c478bd9Sstevel@tonic-gate #define KRB5_KDC_UNREACH (-1765328228L) 28287c478bd9Sstevel@tonic-gate #define KRB5_NO_LOCALNAME (-1765328227L) 28297c478bd9Sstevel@tonic-gate #define KRB5_MUTUAL_FAILED (-1765328226L) 28307c478bd9Sstevel@tonic-gate #define KRB5_RC_TYPE_EXISTS (-1765328225L) 28317c478bd9Sstevel@tonic-gate #define KRB5_RC_MALLOC (-1765328224L) 28327c478bd9Sstevel@tonic-gate #define KRB5_RC_TYPE_NOTFOUND (-1765328223L) 28337c478bd9Sstevel@tonic-gate #define KRB5_RC_UNKNOWN (-1765328222L) 28347c478bd9Sstevel@tonic-gate #define KRB5_RC_REPLAY (-1765328221L) 28357c478bd9Sstevel@tonic-gate #define KRB5_RC_IO (-1765328220L) 28367c478bd9Sstevel@tonic-gate #define KRB5_RC_NOIO (-1765328219L) 28377c478bd9Sstevel@tonic-gate #define KRB5_RC_PARSE (-1765328218L) 28387c478bd9Sstevel@tonic-gate #define KRB5_RC_IO_EOF (-1765328217L) 28397c478bd9Sstevel@tonic-gate #define KRB5_RC_IO_MALLOC (-1765328216L) 28407c478bd9Sstevel@tonic-gate #define KRB5_RC_IO_PERM (-1765328215L) 28417c478bd9Sstevel@tonic-gate #define KRB5_RC_IO_IO (-1765328214L) 28427c478bd9Sstevel@tonic-gate #define KRB5_RC_IO_UNKNOWN (-1765328213L) 28437c478bd9Sstevel@tonic-gate #define KRB5_RC_IO_SPACE (-1765328212L) 28447c478bd9Sstevel@tonic-gate #define KRB5_TRANS_CANTOPEN (-1765328211L) 28457c478bd9Sstevel@tonic-gate #define KRB5_TRANS_BADFORMAT (-1765328210L) 28467c478bd9Sstevel@tonic-gate #define KRB5_LNAME_CANTOPEN (-1765328209L) 28477c478bd9Sstevel@tonic-gate #define KRB5_LNAME_NOTRANS (-1765328208L) 28487c478bd9Sstevel@tonic-gate #define KRB5_LNAME_BADFORMAT (-1765328207L) 28497c478bd9Sstevel@tonic-gate #define KRB5_CRYPTO_INTERNAL (-1765328206L) 28507c478bd9Sstevel@tonic-gate #define KRB5_KT_BADNAME (-1765328205L) 28517c478bd9Sstevel@tonic-gate #define KRB5_KT_UNKNOWN_TYPE (-1765328204L) 28527c478bd9Sstevel@tonic-gate #define KRB5_KT_NOTFOUND (-1765328203L) 28537c478bd9Sstevel@tonic-gate #define KRB5_KT_END (-1765328202L) 28547c478bd9Sstevel@tonic-gate #define KRB5_KT_NOWRITE (-1765328201L) 28557c478bd9Sstevel@tonic-gate #define KRB5_KT_IOERR (-1765328200L) 28567c478bd9Sstevel@tonic-gate #define KRB5_NO_TKT_IN_RLM (-1765328199L) 28577c478bd9Sstevel@tonic-gate #define KRB5DES_BAD_KEYPAR (-1765328198L) 28587c478bd9Sstevel@tonic-gate #define KRB5DES_WEAK_KEY (-1765328197L) 28597c478bd9Sstevel@tonic-gate #define KRB5_BAD_ENCTYPE (-1765328196L) 28607c478bd9Sstevel@tonic-gate #define KRB5_BAD_KEYSIZE (-1765328195L) 28617c478bd9Sstevel@tonic-gate #define KRB5_BAD_MSIZE (-1765328194L) 28627c478bd9Sstevel@tonic-gate #define KRB5_CC_TYPE_EXISTS (-1765328193L) 28637c478bd9Sstevel@tonic-gate #define KRB5_KT_TYPE_EXISTS (-1765328192L) 28647c478bd9Sstevel@tonic-gate #define KRB5_CC_IO (-1765328191L) 28657c478bd9Sstevel@tonic-gate #define KRB5_FCC_PERM (-1765328190L) 28667c478bd9Sstevel@tonic-gate #define KRB5_FCC_NOFILE (-1765328189L) 28677c478bd9Sstevel@tonic-gate #define KRB5_FCC_INTERNAL (-1765328188L) 28687c478bd9Sstevel@tonic-gate #define KRB5_CC_WRITE (-1765328187L) 28697c478bd9Sstevel@tonic-gate #define KRB5_CC_NOMEM (-1765328186L) 28707c478bd9Sstevel@tonic-gate #define KRB5_CC_FORMAT (-1765328185L) 28717c478bd9Sstevel@tonic-gate #define KRB5_CC_NOT_KTYPE (-1765328184L) 28727c478bd9Sstevel@tonic-gate #define KRB5_INVALID_FLAGS (-1765328183L) 28737c478bd9Sstevel@tonic-gate #define KRB5_NO_2ND_TKT (-1765328182L) 28747c478bd9Sstevel@tonic-gate #define KRB5_NOCREDS_SUPPLIED (-1765328181L) 28757c478bd9Sstevel@tonic-gate #define KRB5_SENDAUTH_BADAUTHVERS (-1765328180L) 28767c478bd9Sstevel@tonic-gate #define KRB5_SENDAUTH_BADAPPLVERS (-1765328179L) 28777c478bd9Sstevel@tonic-gate #define KRB5_SENDAUTH_BADRESPONSE (-1765328178L) 28787c478bd9Sstevel@tonic-gate #define KRB5_SENDAUTH_REJECTED (-1765328177L) 28797c478bd9Sstevel@tonic-gate #define KRB5_PREAUTH_BAD_TYPE (-1765328176L) 28807c478bd9Sstevel@tonic-gate #define KRB5_PREAUTH_NO_KEY (-1765328175L) 28817c478bd9Sstevel@tonic-gate #define KRB5_PREAUTH_FAILED (-1765328174L) 28827c478bd9Sstevel@tonic-gate #define KRB5_RCACHE_BADVNO (-1765328173L) 28837c478bd9Sstevel@tonic-gate #define KRB5_CCACHE_BADVNO (-1765328172L) 28847c478bd9Sstevel@tonic-gate #define KRB5_KEYTAB_BADVNO (-1765328171L) 28857c478bd9Sstevel@tonic-gate #define KRB5_PROG_ATYPE_NOSUPP (-1765328170L) 28867c478bd9Sstevel@tonic-gate #define KRB5_RC_REQUIRED (-1765328169L) 28877c478bd9Sstevel@tonic-gate #define KRB5_ERR_BAD_HOSTNAME (-1765328168L) 28887c478bd9Sstevel@tonic-gate #define KRB5_ERR_HOST_REALM_UNKNOWN (-1765328167L) 28897c478bd9Sstevel@tonic-gate #define KRB5_SNAME_UNSUPP_NAMETYPE (-1765328166L) 28907c478bd9Sstevel@tonic-gate #define KRB5KRB_AP_ERR_V4_REPLY (-1765328165L) 28917c478bd9Sstevel@tonic-gate #define KRB5_REALM_CANT_RESOLVE (-1765328164L) 28927c478bd9Sstevel@tonic-gate #define KRB5_TKT_NOT_FORWARDABLE (-1765328163L) 28937c478bd9Sstevel@tonic-gate #define KRB5_FWD_BAD_PRINCIPAL (-1765328162L) 28947c478bd9Sstevel@tonic-gate #define KRB5_GET_IN_TKT_LOOP (-1765328161L) 28957c478bd9Sstevel@tonic-gate #define KRB5_CONFIG_NODEFREALM (-1765328160L) 28967c478bd9Sstevel@tonic-gate #define KRB5_SAM_UNSUPPORTED (-1765328159L) 28977c478bd9Sstevel@tonic-gate #define KRB5_SAM_INVALID_ETYPE (-1765328158L) 28987c478bd9Sstevel@tonic-gate #define KRB5_SAM_NO_CHECKSUM (-1765328157L) 28997c478bd9Sstevel@tonic-gate #define KRB5_SAM_BAD_CHECKSUM (-1765328156L) 29007c478bd9Sstevel@tonic-gate #define KRB5_KT_NAME_TOOLONG (-1765328155L) 29017c478bd9Sstevel@tonic-gate #define KRB5_KT_KVNONOTFOUND (-1765328154L) 29027c478bd9Sstevel@tonic-gate #define KRB5_APPL_EXPIRED (-1765328153L) 29037c478bd9Sstevel@tonic-gate #define KRB5_LIB_EXPIRED (-1765328152L) 29047c478bd9Sstevel@tonic-gate #define KRB5_CHPW_PWDNULL (-1765328151L) 29057c478bd9Sstevel@tonic-gate #define KRB5_CHPW_FAIL (-1765328150L) 29067c478bd9Sstevel@tonic-gate #define KRB5_KT_FORMAT (-1765328149L) 29077c478bd9Sstevel@tonic-gate #define KRB5_NOPERM_ETYPE (-1765328148L) 29087c478bd9Sstevel@tonic-gate #define KRB5_CONFIG_ETYPE_NOSUPP (-1765328147L) 29097c478bd9Sstevel@tonic-gate #define KRB5_OBSOLETE_FN (-1765328146L) 29107c478bd9Sstevel@tonic-gate #define KRB5_EAI_FAIL (-1765328145L) 29117c478bd9Sstevel@tonic-gate #define KRB5_EAI_NODATA (-1765328144L) 29127c478bd9Sstevel@tonic-gate #define KRB5_EAI_NONAME (-1765328143L) 29137c478bd9Sstevel@tonic-gate #define KRB5_EAI_SERVICE (-1765328142L) 29147c478bd9Sstevel@tonic-gate #define KRB5_ERR_NUMERIC_REALM (-1765328141L) 29157c478bd9Sstevel@tonic-gate #define KRB5_ERR_BAD_S2K_PARAMS (-1765328140L) 29167c478bd9Sstevel@tonic-gate #define KRB5_ERR_NO_SERVICE (-1765328139L) 29177c478bd9Sstevel@tonic-gate #define KRB5_CC_READONLY (-1765328138L) 29187c478bd9Sstevel@tonic-gate #define KRB5_CC_NOSUPP (-1765328137L) 29197c478bd9Sstevel@tonic-gate 29207c478bd9Sstevel@tonic-gate /* NOTE! error values should not collide */ 29217c478bd9Sstevel@tonic-gate /* XXX Note KRB5_RC_BADNAME and KRB5_CONF_NOT_CONFIGURED are Solaris specific */ 29227c478bd9Sstevel@tonic-gate #define KRB5_RC_BADNAME (-1765328136L) 29237c478bd9Sstevel@tonic-gate #define KRB5_CONF_NOT_CONFIGURED (-1765328135L) 29247c478bd9Sstevel@tonic-gate #ifdef _KERNEL 29257c478bd9Sstevel@tonic-gate /* XXX Note KRB5_KEF_ERROR and PKCS_ERR are Solaris specific */ 29267c478bd9Sstevel@tonic-gate #define KRB5_KEF_ERROR (-1765328134L) 29277c478bd9Sstevel@tonic-gate #else 29287c478bd9Sstevel@tonic-gate #define PKCS_ERR (-1765328134L) 29297c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 2930505d05c7Sgtb 2931505d05c7Sgtb #define KRB5_DELTAT_BADFORMAT (-1765328133L) 2932505d05c7Sgtb 29337c478bd9Sstevel@tonic-gate #define ERROR_TABLE_BASE_krb5 (-1765328384L) 29347c478bd9Sstevel@tonic-gate 29357c478bd9Sstevel@tonic-gate /* for compatibility with older versions... */ 29367c478bd9Sstevel@tonic-gate #define krb5_err_base ERROR_TABLE_BASE_krb5 29377c478bd9Sstevel@tonic-gate /* 29387c478bd9Sstevel@tonic-gate * kdb5_err.h: 29397c478bd9Sstevel@tonic-gate * This file is automatically generated; please do not edit it. 29407c478bd9Sstevel@tonic-gate */ 29417c478bd9Sstevel@tonic-gate #define KRB5_KDB_RCSID (-1780008448L) 29427c478bd9Sstevel@tonic-gate #define KRB5_KDB_INUSE (-1780008447L) 29437c478bd9Sstevel@tonic-gate #define KRB5_KDB_UK_SERROR (-1780008446L) 29447c478bd9Sstevel@tonic-gate #define KRB5_KDB_UK_RERROR (-1780008445L) 29457c478bd9Sstevel@tonic-gate #define KRB5_KDB_UNAUTH (-1780008444L) 29467c478bd9Sstevel@tonic-gate #define KRB5_KDB_NOENTRY (-1780008443L) 29477c478bd9Sstevel@tonic-gate #define KRB5_KDB_ILL_WILDCARD (-1780008442L) 29487c478bd9Sstevel@tonic-gate #define KRB5_KDB_DB_INUSE (-1780008441L) 29497c478bd9Sstevel@tonic-gate #define KRB5_KDB_DB_CHANGED (-1780008440L) 29507c478bd9Sstevel@tonic-gate #define KRB5_KDB_TRUNCATED_RECORD (-1780008439L) 29517c478bd9Sstevel@tonic-gate #define KRB5_KDB_RECURSIVELOCK (-1780008438L) 29527c478bd9Sstevel@tonic-gate #define KRB5_KDB_NOTLOCKED (-1780008437L) 29537c478bd9Sstevel@tonic-gate #define KRB5_KDB_BADLOCKMODE (-1780008436L) 29547c478bd9Sstevel@tonic-gate #define KRB5_KDB_DBNOTINITED (-1780008435L) 29557c478bd9Sstevel@tonic-gate #define KRB5_KDB_DBINITED (-1780008434L) 29567c478bd9Sstevel@tonic-gate #define KRB5_KDB_ILLDIRECTION (-1780008433L) 29577c478bd9Sstevel@tonic-gate #define KRB5_KDB_NOMASTERKEY (-1780008432L) 29587c478bd9Sstevel@tonic-gate #define KRB5_KDB_BADMASTERKEY (-1780008431L) 29597c478bd9Sstevel@tonic-gate #define KRB5_KDB_INVALIDKEYSIZE (-1780008430L) 29607c478bd9Sstevel@tonic-gate #define KRB5_KDB_CANTREAD_STORED (-1780008429L) 29617c478bd9Sstevel@tonic-gate #define KRB5_KDB_BADSTORED_MKEY (-1780008428L) 29627c478bd9Sstevel@tonic-gate #define KRB5_KDB_CANTLOCK_DB (-1780008427L) 29637c478bd9Sstevel@tonic-gate #define KRB5_KDB_DB_CORRUPT (-1780008426L) 29647c478bd9Sstevel@tonic-gate #define KRB5_KDB_BAD_VERSION (-1780008425L) 29657c478bd9Sstevel@tonic-gate #define KRB5_KDB_BAD_SALTTYPE (-1780008424L) 29667c478bd9Sstevel@tonic-gate #define KRB5_KDB_BAD_ENCTYPE (-1780008423L) 29677c478bd9Sstevel@tonic-gate #define KRB5_KDB_BAD_CREATEFLAGS (-1780008422L) 29687c478bd9Sstevel@tonic-gate #define KRB5_KDB_NO_PERMITTED_KEY (-1780008421L) 29697c478bd9Sstevel@tonic-gate #define KRB5_KDB_NO_MATCHING_KEY (-1780008420L) 29707c478bd9Sstevel@tonic-gate /* 29717c478bd9Sstevel@tonic-gate * Incremental propagation error codes 29727c478bd9Sstevel@tonic-gate */ 29737c478bd9Sstevel@tonic-gate #define KRB5_LOG_CONV (-1780008419L) 29747c478bd9Sstevel@tonic-gate #define KRB5_LOG_UNSTABLE (-1780008418L) 29757c478bd9Sstevel@tonic-gate #define KRB5_LOG_CORRUPT (-1780008417L) 29767c478bd9Sstevel@tonic-gate #define KRB5_LOG_ERROR (-1780008416L) 29777c478bd9Sstevel@tonic-gate #define ERROR_TABLE_BASE_kdb5 (-1780008448L) 29787c478bd9Sstevel@tonic-gate 29797c478bd9Sstevel@tonic-gate /* for compatibility with older versions... */ 29807c478bd9Sstevel@tonic-gate #define kdb5_err_base ERROR_TABLE_BASE_kdb5 29817c478bd9Sstevel@tonic-gate /* 29827c478bd9Sstevel@tonic-gate * kv5m_err.h: 29837c478bd9Sstevel@tonic-gate * This file is automatically generated; please do not edit it. 29847c478bd9Sstevel@tonic-gate */ 29857c478bd9Sstevel@tonic-gate #define KV5M_NONE (-1760647424L) 29867c478bd9Sstevel@tonic-gate #define KV5M_PRINCIPAL (-1760647423L) 29877c478bd9Sstevel@tonic-gate #define KV5M_DATA (-1760647422L) 29887c478bd9Sstevel@tonic-gate #define KV5M_KEYBLOCK (-1760647421L) 29897c478bd9Sstevel@tonic-gate #define KV5M_CHECKSUM (-1760647420L) 29907c478bd9Sstevel@tonic-gate #define KV5M_ENCRYPT_BLOCK (-1760647419L) 29917c478bd9Sstevel@tonic-gate #define KV5M_ENC_DATA (-1760647418L) 29927c478bd9Sstevel@tonic-gate #define KV5M_CRYPTOSYSTEM_ENTRY (-1760647417L) 29937c478bd9Sstevel@tonic-gate #define KV5M_CS_TABLE_ENTRY (-1760647416L) 29947c478bd9Sstevel@tonic-gate #define KV5M_CHECKSUM_ENTRY (-1760647415L) 29957c478bd9Sstevel@tonic-gate #define KV5M_AUTHDATA (-1760647414L) 29967c478bd9Sstevel@tonic-gate #define KV5M_TRANSITED (-1760647413L) 29977c478bd9Sstevel@tonic-gate #define KV5M_ENC_TKT_PART (-1760647412L) 29987c478bd9Sstevel@tonic-gate #define KV5M_TICKET (-1760647411L) 29997c478bd9Sstevel@tonic-gate #define KV5M_AUTHENTICATOR (-1760647410L) 30007c478bd9Sstevel@tonic-gate #define KV5M_TKT_AUTHENT (-1760647409L) 30017c478bd9Sstevel@tonic-gate #define KV5M_CREDS (-1760647408L) 30027c478bd9Sstevel@tonic-gate #define KV5M_LAST_REQ_ENTRY (-1760647407L) 30037c478bd9Sstevel@tonic-gate #define KV5M_PA_DATA (-1760647406L) 30047c478bd9Sstevel@tonic-gate #define KV5M_KDC_REQ (-1760647405L) 30057c478bd9Sstevel@tonic-gate #define KV5M_ENC_KDC_REP_PART (-1760647404L) 30067c478bd9Sstevel@tonic-gate #define KV5M_KDC_REP (-1760647403L) 30077c478bd9Sstevel@tonic-gate #define KV5M_ERROR (-1760647402L) 30087c478bd9Sstevel@tonic-gate #define KV5M_AP_REQ (-1760647401L) 30097c478bd9Sstevel@tonic-gate #define KV5M_AP_REP (-1760647400L) 30107c478bd9Sstevel@tonic-gate #define KV5M_AP_REP_ENC_PART (-1760647399L) 30117c478bd9Sstevel@tonic-gate #define KV5M_RESPONSE (-1760647398L) 30127c478bd9Sstevel@tonic-gate #define KV5M_SAFE (-1760647397L) 30137c478bd9Sstevel@tonic-gate #define KV5M_PRIV (-1760647396L) 30147c478bd9Sstevel@tonic-gate #define KV5M_PRIV_ENC_PART (-1760647395L) 30157c478bd9Sstevel@tonic-gate #define KV5M_CRED (-1760647394L) 30167c478bd9Sstevel@tonic-gate #define KV5M_CRED_INFO (-1760647393L) 30177c478bd9Sstevel@tonic-gate #define KV5M_CRED_ENC_PART (-1760647392L) 30187c478bd9Sstevel@tonic-gate #define KV5M_PWD_DATA (-1760647391L) 30197c478bd9Sstevel@tonic-gate #define KV5M_ADDRESS (-1760647390L) 30207c478bd9Sstevel@tonic-gate #define KV5M_KEYTAB_ENTRY (-1760647389L) 30217c478bd9Sstevel@tonic-gate #define KV5M_CONTEXT (-1760647388L) 30227c478bd9Sstevel@tonic-gate #define KV5M_OS_CONTEXT (-1760647387L) 30237c478bd9Sstevel@tonic-gate #define KV5M_ALT_METHOD (-1760647386L) 30247c478bd9Sstevel@tonic-gate #define KV5M_ETYPE_INFO_ENTRY (-1760647385L) 30257c478bd9Sstevel@tonic-gate #define KV5M_DB_CONTEXT (-1760647384L) 30267c478bd9Sstevel@tonic-gate #define KV5M_AUTH_CONTEXT (-1760647383L) 30277c478bd9Sstevel@tonic-gate #define KV5M_KEYTAB (-1760647382L) 30287c478bd9Sstevel@tonic-gate #define KV5M_RCACHE (-1760647381L) 30297c478bd9Sstevel@tonic-gate #define KV5M_CCACHE (-1760647380L) 30307c478bd9Sstevel@tonic-gate #define KV5M_PREAUTH_OPS (-1760647379L) 30317c478bd9Sstevel@tonic-gate #define KV5M_SAM_CHALLENGE (-1760647378L) 30327c478bd9Sstevel@tonic-gate #define KV5M_SAM_KEY (-1760647377L) 30337c478bd9Sstevel@tonic-gate #define KV5M_ENC_SAM_RESPONSE_ENC (-1760647376L) 30347c478bd9Sstevel@tonic-gate #define KV5M_ENC_SAM_RESPONSE_ENC_2 (-1760647374L) 30357c478bd9Sstevel@tonic-gate #define KV5M_SAM_RESPONSE (-1760647373L) 30367c478bd9Sstevel@tonic-gate #define KV5M_SAM_RESPONSE_2 (-1760647372L) 30377c478bd9Sstevel@tonic-gate #define KV5M_PREDICTED_SAM_RESPONSE (-1760647371L) 30387c478bd9Sstevel@tonic-gate #define KV5M_PASSWD_PHRASE_ELEMENT (-1760647370L) 30397c478bd9Sstevel@tonic-gate #define KV5M_GSS_OID (-1760647369L) 30407c478bd9Sstevel@tonic-gate #define KV5M_GSS_QUEUE (-1760647368L) 30417c478bd9Sstevel@tonic-gate #define ERROR_TABLE_BASE_kv5m (-1760647424L) 30427c478bd9Sstevel@tonic-gate 30437c478bd9Sstevel@tonic-gate /* for compatibility with older versions... */ 30447c478bd9Sstevel@tonic-gate #define kv5m_err_base ERROR_TABLE_BASE_kv5m 30457c478bd9Sstevel@tonic-gate /* 30467c478bd9Sstevel@tonic-gate * asn1_err.h: 30477c478bd9Sstevel@tonic-gate * This file is automatically generated; please do not edit it. 30487c478bd9Sstevel@tonic-gate */ 30497c478bd9Sstevel@tonic-gate #define ASN1_BAD_TIMEFORMAT (1859794432L) 30507c478bd9Sstevel@tonic-gate #define ASN1_MISSING_FIELD (1859794433L) 30517c478bd9Sstevel@tonic-gate #define ASN1_MISPLACED_FIELD (1859794434L) 30527c478bd9Sstevel@tonic-gate #define ASN1_TYPE_MISMATCH (1859794435L) 30537c478bd9Sstevel@tonic-gate #define ASN1_OVERFLOW (1859794436L) 30547c478bd9Sstevel@tonic-gate #define ASN1_OVERRUN (1859794437L) 30557c478bd9Sstevel@tonic-gate #define ASN1_BAD_ID (1859794438L) 30567c478bd9Sstevel@tonic-gate #define ASN1_BAD_LENGTH (1859794439L) 30577c478bd9Sstevel@tonic-gate #define ASN1_BAD_FORMAT (1859794440L) 30587c478bd9Sstevel@tonic-gate #define ASN1_PARSE_ERROR (1859794441L) 30597c478bd9Sstevel@tonic-gate #define ASN1_BAD_GMTIME (1859794442L) 30607c478bd9Sstevel@tonic-gate #define ASN1_MISMATCH_INDEF (1859794443L) 30617c478bd9Sstevel@tonic-gate #define ASN1_MISSING_EOC (1859794444L) 30627c478bd9Sstevel@tonic-gate #define ERROR_TABLE_BASE_asn1 (1859794432L) 30637c478bd9Sstevel@tonic-gate 30647c478bd9Sstevel@tonic-gate /* for compatibility with older versions... */ 30657c478bd9Sstevel@tonic-gate #define asn1_err_base ERROR_TABLE_BASE_asn1 30667c478bd9Sstevel@tonic-gate 30677c478bd9Sstevel@tonic-gate #ifdef __cplusplus 30687c478bd9Sstevel@tonic-gate } 30697c478bd9Sstevel@tonic-gate #endif 30707c478bd9Sstevel@tonic-gate 30717c478bd9Sstevel@tonic-gate #endif /* _KRB5_H */ 3072