static NTSTATUS get_password_from_trustAuth(TALLOC_CTX *mem_ctx,
const DATA_BLOB *trustAuth_blob,
- const DATA_BLOB *session_key,
+ struct netlogon_creds_CredentialState *creds,
struct samr_Password *current_pw_enc,
struct samr_Password *previous_pw_enc)
{
return NT_STATUS_UNSUCCESSFUL;
}
- arcfour_crypt_blob(current_pw_enc->hash, sizeof(current_pw_enc->hash),
- session_key);
+ netlogon_creds_arcfour_crypt(creds, current_pw_enc->hash, sizeof(current_pw_enc->hash));
if (trustAuth.previous.count != 0 &&
trustAuth.previous.array[0].AuthType == TRUST_AUTH_TYPE_CLEAR) {
} else {
mdfour(previous_pw_enc->hash, NULL, 0);
}
- arcfour_crypt_blob(previous_pw_enc->hash, sizeof(previous_pw_enc->hash),
- session_key);
+
+ netlogon_creds_arcfour_crypt(creds, previous_pw_enc->hash, sizeof(previous_pw_enc->hash));
return NT_STATUS_OK;
}
DATA_BLOB trustAuth_blob;
struct samr_Password *new_owf_enc;
struct samr_Password *old_owf_enc;
- DATA_BLOB session_key;
struct loadparm_context *lp_ctx;
lp_ctx = loadparm_init_s3(p->mem_ctx, loadparm_s3_helpers());
trustAuth_blob = td->trust_auth_outgoing;
}
- session_key.data = creds->session_key;
- session_key.length = sizeof(creds->session_key);
status = get_password_from_trustAuth(p->mem_ctx, &trustAuth_blob,
- &session_key,
+ creds,
new_owf_enc, old_owf_enc);
if (!NT_STATUS_IS_OK(status)) {