summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-07-15 10:04:11 +0100
committerMatt Caswell <matt@openssl.org>2016-07-18 14:30:14 +0100
commit7d2c13a705acfad1827634e89356a72999a641a2 (patch)
treee4127fff42d8cee89bae75d15e88d662d8c16e04 /ssl
parent1b5c44b810f8d807ba9a98d766bfef8f53b08960 (diff)
Simplify key_exchange_expected() logic
The static function key_exchange_expected() used to return -1 on error. Commit 361a119127 changed that so that it can never fail. This means that some tidy up can be done to simplify error handling in callers of that function. Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/statem/statem_clnt.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 864f76cfcd..bcbb0fd2ba 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -90,7 +90,6 @@ static ossl_inline int cert_req_allowed(SSL *s)
* Return values are:
* 1: Yes
* 0: No
- * -1: Error
*/
static int key_exchange_expected(SSL *s)
{
@@ -174,8 +173,6 @@ int ossl_statem_client_read_transition(SSL *s, int mt)
}
} else {
ske_expected = key_exchange_expected(s);
- if (ske_expected < 0)
- goto err;
/* SKE is optional for some PSK ciphersuites */
if (ske_expected
|| ((s->s3->tmp.new_cipher->algorithm_mkey & SSL_PSK)
@@ -209,8 +206,6 @@ int ossl_statem_client_read_transition(SSL *s, int mt)
case TLS_ST_CR_CERT_STATUS:
ske_expected = key_exchange_expected(s);
- if (ske_expected < 0)
- goto err;
/* SKE is optional for some PSK ciphersuites */
if (ske_expected
|| ((s->s3->tmp.new_cipher->algorithm_mkey & SSL_PSK)