xref: /onnv-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/int-proto.h (revision 13132:9615cdbf7b70)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * lib/krb5/krb/int-proto.h
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * Copyright 1990,1991 the Massachusetts Institute of Technology.
50Sstevel@tonic-gate  * All Rights Reserved.
60Sstevel@tonic-gate  *
70Sstevel@tonic-gate  * Export of this software from the United States of America may
80Sstevel@tonic-gate  *   require a specific license from the United States Government.
90Sstevel@tonic-gate  *   It is the responsibility of any person or organization contemplating
100Sstevel@tonic-gate  *   export to obtain such a license before exporting.
110Sstevel@tonic-gate  *
120Sstevel@tonic-gate  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
130Sstevel@tonic-gate  * distribute this software and its documentation for any purpose and
140Sstevel@tonic-gate  * without fee is hereby granted, provided that the above copyright
150Sstevel@tonic-gate  * notice appear in all copies and that both that copyright notice and
160Sstevel@tonic-gate  * this permission notice appear in supporting documentation, and that
170Sstevel@tonic-gate  * the name of M.I.T. not be used in advertising or publicity pertaining
180Sstevel@tonic-gate  * to distribution of the software without specific, written prior
197934SMark.Phalan@Sun.COM  * permission.  Furthermore if you modify this software you must label
207934SMark.Phalan@Sun.COM  * your software as modified software and not distribute it in such a
217934SMark.Phalan@Sun.COM  * fashion that it might be confused with the original M.I.T. software.
227934SMark.Phalan@Sun.COM  * M.I.T. makes no representations about the suitability of
230Sstevel@tonic-gate  * this software for any purpose.  It is provided "as is" without express
240Sstevel@tonic-gate  * or implied warranty.
250Sstevel@tonic-gate  *
260Sstevel@tonic-gate  *
270Sstevel@tonic-gate  * Function prototypes for Kerberos V5 library internal functions.
280Sstevel@tonic-gate  */
290Sstevel@tonic-gate 
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #ifndef KRB5_INT_FUNC_PROTO__
320Sstevel@tonic-gate #define KRB5_INT_FUNC_PROTO__
330Sstevel@tonic-gate 
340Sstevel@tonic-gate krb5_error_code krb5_tgtname
35781Sgtb     	(krb5_context context,
360Sstevel@tonic-gate 	           const krb5_data *,
370Sstevel@tonic-gate 	           const krb5_data *,
38781Sgtb 	           krb5_principal *);
39781Sgtb 
40781Sgtb krb5_error_code krb5_libdefault_boolean
41781Sgtb         (krb5_context, const krb5_data *, const char *,
42781Sgtb 			int *);
43781Sgtb 
44781Sgtb krb5_error_code krb5_ser_authdata_init (krb5_context);
45781Sgtb krb5_error_code krb5_ser_address_init (krb5_context);
46781Sgtb krb5_error_code krb5_ser_authenticator_init (krb5_context);
47781Sgtb krb5_error_code krb5_ser_checksum_init (krb5_context);
48781Sgtb krb5_error_code krb5_ser_keyblock_init (krb5_context);
49781Sgtb krb5_error_code krb5_ser_principal_init (krb5_context);
500Sstevel@tonic-gate 
517934SMark.Phalan@Sun.COM krb5_error_code
527934SMark.Phalan@Sun.COM krb5_preauth_supply_preauth_data(krb5_context context,
537934SMark.Phalan@Sun.COM 				 krb5_gic_opt_ext *opte,
547934SMark.Phalan@Sun.COM 				 const char *attr,
557934SMark.Phalan@Sun.COM 				 const char *value);
567934SMark.Phalan@Sun.COM 
57*13132SGlenn.Barry@oracle.com #define in_clock_skew(date, now) (labs((date)-(now)) < context->clockskew)
58*13132SGlenn.Barry@oracle.com 
59*13132SGlenn.Barry@oracle.com #define IS_TGS_PRINC(c, p)                                              \
60*13132SGlenn.Barry@oracle.com     (krb5_princ_size((c), (p)) == 2 &&                                  \
61*13132SGlenn.Barry@oracle.com      data_eq_string(*krb5_princ_component((c), (p), 0), KRB5_TGS_NAME))
62*13132SGlenn.Barry@oracle.com 
630Sstevel@tonic-gate #endif /* KRB5_INT_FUNC_PROTO__ */
640Sstevel@tonic-gate 
65