Add a return value to prf_t.set_key()
This commit is contained in:
@@ -36,8 +36,7 @@ struct private_tls_prf12_t {
|
||||
METHOD(tls_prf_t, set_key12, bool,
|
||||
private_tls_prf12_t *this, chunk_t key)
|
||||
{
|
||||
this->prf->set_key(this->prf, key);
|
||||
return TRUE;
|
||||
return this->prf->set_key(this->prf, key);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,9 +144,9 @@ METHOD(tls_prf_t, set_key10, bool,
|
||||
{
|
||||
size_t len = key.len / 2 + key.len % 2;
|
||||
|
||||
this->md5->set_key(this->md5, chunk_create(key.ptr, len));
|
||||
this->sha1->set_key(this->sha1, chunk_create(key.ptr + key.len - len, len));
|
||||
return TRUE;
|
||||
return this->md5->set_key(this->md5, chunk_create(key.ptr, len)) &&
|
||||
this->sha1->set_key(this->sha1, chunk_create(key.ptr + key.len - len,
|
||||
len));
|
||||
}
|
||||
|
||||
METHOD(tls_prf_t, get_bytes10, bool,
|
||||
|
||||
Reference in New Issue
Block a user