source: vendor/current/auth/kerberos/pac_utils.h

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 2.3 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 kerberos authorization data (PAC) utility library
4 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2011
5 Copyright (C) Simo Sorce 2010-2012
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef _PAC_UTILS_H
22#define _PAC_UTILS_H
23
24#ifdef HAVE_KRB5
25
26#include "lib/krb5_wrap/krb5_samba.h"
27#include "lib/krb5_wrap/gss_samba.h"
28
29struct PAC_SIGNATURE_DATA;
30struct PAC_DATA;
31struct PAC_LOGON_INFO;
32
33krb5_error_code check_pac_checksum(DATA_BLOB pac_data,
34 struct PAC_SIGNATURE_DATA *sig,
35 krb5_context context,
36 const krb5_keyblock *keyblock);
37
38NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
39 DATA_BLOB pac_data_blob,
40 krb5_context context,
41 const krb5_keyblock *krbtgt_keyblock,
42 const krb5_keyblock *service_keyblock,
43 krb5_const_principal client_principal,
44 time_t tgs_authtime,
45 struct PAC_DATA **pac_data_out);
46
47NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
48 DATA_BLOB blob,
49 krb5_context context,
50 const krb5_keyblock *krbtgt_keyblock,
51 const krb5_keyblock *service_keyblock,
52 krb5_const_principal client_principal,
53 time_t tgs_authtime,
54 struct PAC_LOGON_INFO **logon_info);
55
56NTSTATUS gssapi_obtain_pac_blob(TALLOC_CTX *mem_ctx,
57 gss_ctx_id_t gssapi_context,
58 gss_name_t gss_client_name,
59 DATA_BLOB *pac_data);
60NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
61 gss_ctx_id_t gssapi_context,
62 DATA_BLOB *session_key,
63 uint32_t *keytype);
64
65/* not the best place here, need to move to a more generic gssapi
66 * wrapper later */
67char *gssapi_error_string(TALLOC_CTX *mem_ctx,
68 OM_uint32 maj_stat, OM_uint32 min_stat,
69 const gss_OID mech);
70#endif /* HAVE_KRB5 */
71#endif /* _PAC_UTILS_H */
Note: See TracBrowser for help on using the repository browser.