auth-krb: Move pac related util functions in a single place.
[Samba.git] / auth / kerberos / pac_utils.h
blob9fe08de834c4da96122a3185bd4111cc8b0fa8ab
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
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.
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.
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/>.
21 #ifndef _PAC_UTILS_H
22 #define _PAC_UTILS_H
24 #include "libcli/auth/krb5_wrap.h"
25 struct PAC_SIGNATURE_DATA;
26 struct PAC_DATA;
28 krb5_error_code check_pac_checksum(DATA_BLOB pac_data,
29 struct PAC_SIGNATURE_DATA *sig,
30 krb5_context context,
31 const krb5_keyblock *keyblock);
33 NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
34 DATA_BLOB pac_data_blob,
35 krb5_context context,
36 const krb5_keyblock *krbtgt_keyblock,
37 const krb5_keyblock *service_keyblock,
38 krb5_const_principal client_principal,
39 time_t tgs_authtime,
40 struct PAC_DATA **pac_data_out);
42 NTSTATUS gssapi_obtain_pac_blob(TALLOC_CTX *mem_ctx,
43 gss_ctx_id_t gssapi_context,
44 gss_name_t gss_client_name,
45 DATA_BLOB *pac_data);
46 NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
47 gss_ctx_id_t gssapi_context,
48 DATA_BLOB *session_key,
49 uint32_t *keytype);
50 #endif /* _PAC_UTILS_H */