core: reset crypto key counters when the keys are initialized

This fixes --sec rdp --salted-checksum in combination with farm redirect.

The counters are implicitly set to 0 in rdp_new, but they also has to be reset
after redirects. Resetting the counters when the keys are reset seems like the
cleanest solution.
This commit is contained in:
Mads Kiilerich 2012-03-24 01:57:09 +01:00 committed by Anthony Tong
parent dd0d0f0bdb
commit 024b93933e

View File

@ -420,6 +420,10 @@ boolean security_establish_keys(uint8* client_random, rdpRdp* rdp)
memcpy(rdp->decrypt_update_key, rdp->decrypt_key, 16);
memcpy(rdp->encrypt_update_key, rdp->encrypt_key, 16);
rdp->decrypt_use_count = 0;
rdp->decrypt_checksum_use_count = 0;
rdp->encrypt_use_count =0;
rdp->encrypt_checksum_use_count =0;
return true;
}