struct netr_SamBaseInfo *base = NULL;
const char *crypto_alg = "";
bool can_do_validation_6 = true;
+ enum dcerpc_AuthType auth_type = DCERPC_AUTH_TYPE_NONE;
enum dcerpc_AuthLevel auth_level = DCERPC_AUTH_LEVEL_NONE;
if (lpcfg_client_lanman_auth(tctx->lp_ctx)) {
}
}
- dcerpc_binding_handle_auth_info(b, NULL, &auth_level);
+ dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
r.in.validation_level = 6;
dump_data(1, base->key.key, 16);
dump_data(1, base->LMSessKey.key, 8);
- if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
- netlogon_creds_aes_decrypt(creds, base->key.key, 16);
- netlogon_creds_aes_decrypt(creds, base->LMSessKey.key, 8);
- } else if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) {
- netlogon_creds_arcfour_crypt(creds, base->key.key, 16);
- netlogon_creds_arcfour_crypt(creds, base->LMSessKey.key, 8);
- }
+ status = netlogon_creds_decrypt_samlogon_validation(creds,
+ r.in.validation_level,
+ r.out.validation,
+ auth_type,
+ auth_level);
+ torture_assert_ntstatus_ok(tctx, status, "decrypt_samlogon_validation");
DEBUG(1,("decrypted keys validation_level %d\n",
validation_levels[i]));
struct netr_SamBaseInfo *base = NULL;
const char *crypto_alg = "";
bool can_do_validation_6 = true;
+ enum dcerpc_AuthType auth_type = DCERPC_AUTH_TYPE_NONE;
enum dcerpc_AuthLevel auth_level = DCERPC_AUTH_LEVEL_NONE;
flags |= CLI_CRED_NTLMv2_AUTH;
}
}
- dcerpc_binding_handle_auth_info(b, NULL, &auth_level);
+ dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
r.in.validation_level = 6;
dump_data(1, base->key.key, 16);
dump_data(1, base->LMSessKey.key, 8);
- if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
- netlogon_creds_aes_decrypt(creds, base->key.key, 16);
- netlogon_creds_aes_decrypt(creds, base->LMSessKey.key, 8);
- } else if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) {
- netlogon_creds_arcfour_crypt(creds, base->key.key, 16);
- netlogon_creds_arcfour_crypt(creds, base->LMSessKey.key, 8);
- }
+ status = netlogon_creds_decrypt_samlogon_validation(creds,
+ r.in.validation_level,
+ r.out.validation,
+ auth_type,
+ auth_level);
+ torture_assert_ntstatus_ok(tctx, status, "decrypt_samlogon_validation");
DEBUG(1,("decrypted keys validation_level %d\n",
validation_levels[i]));