libcli/smb: pass the negotiated cipher to smb2_signing_[de|en]ncrypt_pdu()
authorStefan Metzmacher <metze@samba.org>
Tue, 7 Oct 2014 07:54:35 +0000 (09:54 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 16 Oct 2014 17:30:04 +0000 (19:30 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/smb/smbXcli_base.c

index 1b87a0069c960af5bf2351e678ea7b1a2a88156b..bb586ab50dfb689d896f1343ee8fbcca15ad16a8 100644 (file)
@@ -3055,7 +3055,7 @@ skip_credits:
                }
 
                status = smb2_signing_encrypt_pdu(*encryption_key,
-                                       state->conn->protocol,
+                                       state->conn->smb2.server.cipher,
                                        &iov[tf_iov], num_iov - tf_iov);
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
@@ -3230,7 +3230,7 @@ static NTSTATUS smb2cli_inbuf_parse_compound(struct smbXcli_conn *conn,
                        tf_iov[1].iov_len = enc_len;
 
                        status = smb2_signing_decrypt_pdu(s->smb2->decryption_key,
-                                                         conn->protocol,
+                                                         conn->smb2.server.cipher,
                                                          tf_iov, 2);
                        if (!NT_STATUS_IS_OK(status)) {
                                TALLOC_FREE(iov);