.data = old_lm_hash,
.size = sizeof(old_lm_hash),
};
- gnutls_datum_t old_nt_key = {
- .data = old_nt_hash,
- .size = sizeof(old_nt_hash),
- };
domain_name.string = "";
dom_pw_info.in.domain_name = &domain_name;
uint8_t old_lm_hash[16], new_lm_hash[16];
DATA_BLOB old_nt_hash_blob
= data_blob_const(old_nt_hash, sizeof(old_nt_hash));
+ gnutls_cipher_hd_t cipher_hnd = NULL;
+ gnutls_datum_t old_lm_key = {
+ .data = old_lm_hash,
+ .size = sizeof(old_lm_hash),
+ };
struct samr_GetDomPwInfo dom_pw_info;
struct samr_PwInfo info;
E_deshash(newpass, new_lm_hash);
encode_pw_buffer(lm_pass.data, newpass, STR_ASCII|STR_TERMINATE);
- arcfour_crypt(lm_pass.data, old_lm_hash, 516);
+
+ gnutls_cipher_init(&cipher_hnd,
+ GNUTLS_CIPHER_ARCFOUR_128,
+ &old_lm_key,
+ NULL);
+ gnutls_cipher_encrypt(cipher_hnd,
+ lm_pass.data,
+ 516);
+ gnutls_cipher_deinit(cipher_hnd);
+
E_old_pw_hash(new_nt_hash, old_lm_hash, lm_verifier.hash);
crypt_status = init_samr_CryptPassword(newpass,