aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtls/tls_peer.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2015-03-23 11:37:27 +0100
committerMartin Willi <martin@revosec.ch>2015-03-23 17:54:03 +0100
commit42431690e04a8614e759e0a3a3bcd76e30e6207e (patch)
tree4c473700dffe096c07d8117fb7a0df71fc5be56f /src/libtls/tls_peer.c
parent8a7dbf3c2a0a4e8a4a503b630dbad0d46ae25756 (diff)
downloadstrongswan-42431690e04a8614e759e0a3a3bcd76e30e6207e.tar.bz2
strongswan-42431690e04a8614e759e0a3a3bcd76e30e6207e.tar.xz
diffie-hellman: Add a bool return value to get_my_public_value()
Diffstat (limited to 'src/libtls/tls_peer.c')
-rw-r--r--src/libtls/tls_peer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libtls/tls_peer.c b/src/libtls/tls_peer.c
index 82ec262e4..68a2c9421 100644
--- a/src/libtls/tls_peer.c
+++ b/src/libtls/tls_peer.c
@@ -990,7 +990,11 @@ static status_t send_key_exchange_dhe(private_tls_peer_t *this,
}
chunk_clear(&premaster);
- this->dh->get_my_public_value(this->dh, &pub);
+ if (!this->dh->get_my_public_value(this->dh, &pub))
+ {
+ this->alert->add(this->alert, TLS_FATAL, TLS_INTERNAL_ERROR);
+ return NEED_MORE;
+ }
if (this->dh->get_dh_group(this->dh) == MODP_CUSTOM)
{
writer->write_data16(writer, pub);