#include "param/param.h"
#include "auth/credentials/credentials.h"
#include "../libcli/smb/smbXcli_base.h"
+#include "smb2_constants.h"
struct smb2_connect_state {
struct tevent_context *ev;
struct smb2_connect_state *state;
struct composite_context *creq;
static const char *default_ports[] = { "445", "139", NULL };
+ enum smb_encryption_setting encryption_state =
+ cli_credentials_get_smb_encryption(credentials);
req = tevent_req_create(mem_ctx, &state,
struct smb2_connect_state);
state->ports = default_ports;
}
+ if (encryption_state >= SMB_ENCRYPTION_DESIRED) {
+ state->options.signing = SMB_SIGNING_REQUIRED;
+ }
+
make_nbt_name_client(&state->calling,
cli_credentials_get_workstation(credentials));
status = smb2_transport_raw_init(state, ev,
existing_conn,
- options,
+ &state->options,
&state->transport);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);