s3:torture: make use of cli_smb1_setup_encryption() in force_cli_encryption()
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Nov 2016 13:50:28 +0000 (14:50 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 21 Dec 2016 17:35:12 +0000 (18:35 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/torture/torture.c

index 7072f3ccd1cdc9ab67c78353735e307d0dc78c3b..1a57f41e277f1128a230e315ce558b57fb8711ad 100644 (file)
@@ -108,15 +108,7 @@ static bool force_cli_encryption(struct cli_state *c,
                return false;
        }
 
-       if (c->use_kerberos) {
-               status = cli_gss_smb_encryption_start(c);
-       } else {
-               status = cli_raw_ntlm_smb_encryption_start(c,
-                                               username,
-                                               password,
-                                               workgroup);
-       }
-
+       status = cli_smb1_setup_encryption(c, torture_creds);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("Encryption required and "
                        "setup failed with error %s.\n",