diff options
Diffstat (limited to 'src/libtls')
-rw-r--r-- | src/libtls/tls_peer.c | 2 | ||||
-rw-r--r-- | src/libtls/tls_server.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libtls/tls_peer.c b/src/libtls/tls_peer.c index 99bc92ac0..82ec262e4 100644 --- a/src/libtls/tls_peer.c +++ b/src/libtls/tls_peer.c @@ -973,7 +973,7 @@ static status_t send_key_exchange_dhe(private_tls_peer_t *this, { chunk_t premaster, pub; - if (this->dh->get_shared_secret(this->dh, &premaster) != SUCCESS) + if (!this->dh->get_shared_secret(this->dh, &premaster)) { DBG1(DBG_TLS, "calculating premaster from DH failed"); this->alert->add(this->alert, TLS_FATAL, TLS_INTERNAL_ERROR); diff --git a/src/libtls/tls_server.c b/src/libtls/tls_server.c index b6e706d23..df5d00ab5 100644 --- a/src/libtls/tls_server.c +++ b/src/libtls/tls_server.c @@ -495,7 +495,7 @@ static status_t process_key_exchange_dhe(private_tls_server_t *this, pub = chunk_skip(pub, 1); } this->dh->set_other_public_value(this->dh, pub); - if (this->dh->get_shared_secret(this->dh, &premaster) != SUCCESS) + if (!this->dh->get_shared_secret(this->dh, &premaster)) { DBG1(DBG_TLS, "calculating premaster from DH failed"); this->alert->add(this->alert, TLS_FATAL, TLS_INTERNAL_ERROR); |