2 Unix SMB/CIFS implementation.
4 Copyright (C) Jeremy Allison 2003.
5 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2002-2003
6 Copyright (C) Stefan Metzmacher 2009
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _SMB_SIGNING_H_
23 #define _SMB_SIGNING_H_
25 struct smb_signing_state
;
27 struct smb_signing_state
*smb_signing_init(TALLOC_CTX
*mem_ctx
,
30 uint32_t smb_signing_next_seqnum(struct smb_signing_state
*si
, bool oneway
);
31 void smb_signing_cancel_reply(struct smb_signing_state
*si
, bool oneway
);
32 void smb_signing_sign_pdu(struct smb_signing_state
*si
,
33 uint8_t *outbuf
, uint32_t seqnum
);
34 bool smb_signing_check_pdu(struct smb_signing_state
*si
,
35 const uint8_t *inbuf
, uint32_t seqnum
);
36 bool smb_signing_set_bsrspyl(struct smb_signing_state
*si
);
37 bool smb_signing_activate(struct smb_signing_state
*si
,
38 const DATA_BLOB user_session_key
,
39 const DATA_BLOB response
);
40 bool smb_signing_is_active(struct smb_signing_state
*si
);
41 bool smb_signing_is_allowed(struct smb_signing_state
*si
);
42 bool smb_signing_is_mandatory(struct smb_signing_state
*si
);
43 bool smb_signing_set_negotiated(struct smb_signing_state
*si
);
44 bool smb_signing_is_negotiated(struct smb_signing_state
*si
);
46 #endif /* _SMB_SIGNING_H_ */