CVE-2022-2031 gensec_krb5: Add helper function to check if client sent an initial...
[Samba.git] / source4 / auth / gensec / gensec_krb5_internal.h
blob0bb796f1b2a252e0ec9c28b2af3deb1c2affc346
1 /*
2 Unix SMB/CIFS implementation.
4 Kerberos backend for GENSEC
6 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004
7 Copyright (C) Andrew Tridgell 2001
8 Copyright (C) Luke Howard 2002-2003
9 Copyright (C) Stefan Metzmacher 2004-2005
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #include "includes.h"
27 #include "auth/gensec/gensec.h"
28 #include "system/kerberos.h"
29 #include "auth/kerberos/kerberos.h"
31 enum GENSEC_KRB5_STATE {
32 GENSEC_KRB5_SERVER_START,
33 GENSEC_KRB5_CLIENT_START,
34 GENSEC_KRB5_CLIENT_MUTUAL_AUTH,
35 GENSEC_KRB5_DONE
38 struct gensec_krb5_state {
39 enum GENSEC_KRB5_STATE state_position;
40 struct smb_krb5_context *smb_krb5_context;
41 krb5_auth_context auth_context;
42 krb5_data enc_ticket;
43 krb5_keyblock *keyblock;
44 krb5_ticket *ticket;
45 bool gssapi;
46 krb5_flags ap_req_options;