mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
smb2_negotiate: maintain xconn->smb2.server.sign_algo
This prepares the negotiation of signing algorithms in future. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14512 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
3e43962f73
commit
9da2f6727f
@ -529,6 +529,7 @@ struct smbXsrv_connection {
|
||||
uint32_t max_trans;
|
||||
uint32_t max_read;
|
||||
uint32_t max_write;
|
||||
uint16_t sign_algo;
|
||||
uint16_t cipher;
|
||||
} server;
|
||||
|
||||
|
@ -455,6 +455,12 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
|
||||
req->preauth = &req->xconn->smb2.preauth;
|
||||
}
|
||||
|
||||
if (protocol >= PROTOCOL_SMB2_24) {
|
||||
xconn->smb2.server.sign_algo = SMB2_SIGNING_AES128_CMAC;
|
||||
} else {
|
||||
xconn->smb2.server.sign_algo = SMB2_SIGNING_HMAC_SHA256;
|
||||
}
|
||||
|
||||
if ((capabilities & SMB2_CAP_ENCRYPTION) && (in_cipher != NULL)) {
|
||||
size_t needed = 2;
|
||||
uint16_t cipher_count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user