Add a return value to prf_t.set_key()

This commit is contained in:
Martin Willi
2012-07-16 14:53:34 +02:00
parent ecc080b393
commit f3ca96b2bf
12 changed files with 92 additions and 43 deletions
+4 -5
View File
@@ -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,