af-alg: Reset hmac/xcbc state before doing set_key()
This commit is contained in:
@@ -139,6 +139,7 @@ METHOD(prf_t, set_key, bool,
|
|||||||
{
|
{
|
||||||
char buf[this->block_size];
|
char buf[this->block_size];
|
||||||
|
|
||||||
|
this->ops->reset(this->ops);
|
||||||
if (this->xcbc)
|
if (this->xcbc)
|
||||||
{
|
{
|
||||||
/* The kernel currently does not support variable length XCBC keys,
|
/* The kernel currently does not support variable length XCBC keys,
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ METHOD(signer_t, get_block_size, size_t,
|
|||||||
METHOD(signer_t, set_key, bool,
|
METHOD(signer_t, set_key, bool,
|
||||||
private_af_alg_signer_t *this, chunk_t key)
|
private_af_alg_signer_t *this, chunk_t key)
|
||||||
{
|
{
|
||||||
|
this->ops->reset(this->ops);
|
||||||
return this->ops->set_key(this->ops, key);
|
return this->ops->set_key(this->ops, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user