aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtls
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-07-06 16:57:17 +0200
committerMartin Willi <martin@revosec.ch>2012-07-16 14:53:38 +0200
commitce73fc19dbc36d089e595e452356deccd8afcd6f (patch)
treeba7f244b7e566bd86d3e87e6992d831203322445 /src/libtls
parent3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0 (diff)
downloadstrongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.bz2
strongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.xz
Add a return value to crypter_t.set_key()
Diffstat (limited to 'src/libtls')
-rw-r--r--src/libtls/tls_crypto.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libtls/tls_crypto.c b/src/libtls/tls_crypto.c
index fde03b800..074479478 100644
--- a/src/libtls/tls_crypto.c
+++ b/src/libtls/tls_crypto.c
@@ -1560,13 +1560,19 @@ static bool expand_keys(private_tls_crypto_t *this,
if (this->tls->is_server(this->tls))
{
- this->crypter_in->set_key(this->crypter_in, client_write);
- this->crypter_out->set_key(this->crypter_out, server_write);
+ if (!this->crypter_in->set_key(this->crypter_in, client_write) ||
+ !this->crypter_out->set_key(this->crypter_out, server_write))
+ {
+ return FALSE;
+ }
}
else
{
- this->crypter_out->set_key(this->crypter_out, client_write);
- this->crypter_in->set_key(this->crypter_in, server_write);
+ if (!this->crypter_out->set_key(this->crypter_out, client_write) ||
+ !this->crypter_in->set_key(this->crypter_in, server_write))
+ {
+ return FALSE;
+ }
}
if (ivs)
{