1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* lib/krb5/krb/authdata.h */
4 * Copyright (C) 2009 by the Massachusetts Institute of Technology.
7 * Export of this software from the United States of America may
8 * require a specific license from the United States Government.
9 * It is the responsibility of any person or organization contemplating
10 * export to obtain such a license before exporting.
12 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13 * distribute this software and its documentation for any purpose and
14 * without fee is hereby granted, provided that the above copyright
15 * notice appear in all copies and that both that copyright notice and
16 * this permission notice appear in supporting documentation, and that
17 * the name of M.I.T. not be used in advertising or publicity pertaining
18 * to distribution of the software without specific, written prior
19 * permission. Furthermore if you modify this software you must label
20 * your software as modified software and not distribute it in such a
21 * fashion that it might be confused with the original M.I.T. software.
22 * M.I.T. makes no representations about the suitability of
23 * this software for any purpose. It is provided "as is" without express
24 * or implied warranty.
27 #ifndef KRB_AUTHDATA_H
29 #define KRB_AUTHDATA_H
37 krb5int_authdata_verify(krb5_context context,
38 krb5_authdata_context,
40 const krb5_auth_context *auth_context,
41 const krb5_keyblock *key,
42 const krb5_ap_req *ap_req);
46 * A PAC consists of a sequence of PAC_INFO_BUFFERs, preceeded by
47 * a PACTYPE header. Decoding the contents of the buffers is left
48 * to the application (notwithstanding signature verification).
51 typedef struct _PAC_INFO_BUFFER {
53 krb5_ui_4 cbBufferSize;
57 typedef struct _PACTYPE {
60 PAC_INFO_BUFFER Buffers[1];
63 struct krb5_pac_data {
64 PACTYPE *pac; /* PAC header + info buffer array */
65 krb5_data data; /* PAC data (including uninitialised header) */
66 krb5_boolean verified;
71 #define PAC_ALIGNMENT 8
72 #define PACTYPE_LENGTH 8U
73 #define PAC_SIGNATURE_DATA_LENGTH 4U
74 #define PAC_CLIENT_INFO_LENGTH 10U
75 #define PAC_INFO_BUFFER_LENGTH 16
77 #define NT_TIME_EPOCH 11644473600LL
79 extern krb5plugin_authdata_client_ftable_v0 krb5int_mspac_authdata_client_ftable;
80 extern krb5plugin_authdata_client_ftable_v0 krb5int_s4u2proxy_authdata_client_ftable;
83 k5_pac_locate_buffer(krb5_context context,
89 k5_pac_validate_client(krb5_context context,
91 krb5_timestamp authtime,
92 krb5_const_principal principal);
95 k5_pac_add_buffer(krb5_context context,
98 const krb5_data *data,
99 krb5_boolean zerofill,
100 krb5_data *out_data);
103 k5_seconds_since_1970_to_time(krb5_timestamp elapsedSeconds,
107 #endif /* !KRB_AUTHDATA_H */