Clearing hash, just in case.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-08-12 19:55:07 +02:00
parent 0556a528f3
commit be911a7aa7
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -158,6 +158,7 @@ int import_dkek_share(uint8_t id, const uint8_t *share) {
int dkek_kcv(uint8_t id, uint8_t *kcv) { //kcv 8 bytes
uint8_t hsh[32], dkek[DKEK_KEY_SIZE];
memset(kcv, 0, 8);
memset(hsh, 0, sizeof(hsh));
int r = load_dkek(id, dkek);
if (r != CCID_OK)
return r;