summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2018-01-31 16:36:27 -0500
committerMatt Caswell <matt@openssl.org>2018-02-01 17:07:56 +0000
commite43e6b1951de931ca500c6964496e76651332f5e (patch)
tree5141c7f276446059b8674d01461d94893220f79f /ssl
parent658e4879c50dff23c040c681656843a50002e403 (diff)
Fix some minor code nits
Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4964)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/statem/extensions.c1
-rw-r--r--ssl/statem/statem_clnt.c13
2 files changed, 8 insertions, 6 deletions
diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c
index 2faba13fd0..daf43c6276 100644
--- a/ssl/statem/extensions.c
+++ b/ssl/statem/extensions.c
@@ -55,7 +55,6 @@ static int init_srtp(SSL *s, unsigned int context);
static int final_sig_algs(SSL *s, unsigned int context, int sent);
static int final_early_data(SSL *s, unsigned int context, int sent);
static int final_maxfragmentlen(SSL *s, unsigned int context, int sent);
-
static int init_post_handshake_auth(SSL *s, unsigned int context);
/* Structure to define a built-in extension */
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 5050233866..f224da6a64 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -395,15 +395,19 @@ static WRITE_TRAN ossl_statem_client13_write_transition(SSL *s)
* ossl_statem_client_write_transition().
*/
switch (st->hand_state) {
+ default:
+ /* Shouldn't happen */
+ SSLfatal(s, SSL_AD_INTERNAL_ERROR,
+ SSL_F_OSSL_STATEM_CLIENT13_WRITE_TRANSITION,
+ ERR_R_INTERNAL_ERROR);
+ return WRITE_TRAN_ERROR;
+
case TLS_ST_CR_CERT_REQ:
if (s->post_handshake_auth == SSL_PHA_REQUESTED) {
st->hand_state = TLS_ST_CW_CERT;
return WRITE_TRAN_CONTINUE;
}
- /* Fall through */
-
- default:
- /* Shouldn't happen */
+ /* Shouldn't happen - same as default case */
SSLfatal(s, SSL_AD_INTERNAL_ERROR,
SSL_F_OSSL_STATEM_CLIENT13_WRITE_TRANSITION,
ERR_R_INTERNAL_ERROR);
@@ -3367,7 +3371,6 @@ static int ssl3_check_client_certificate(SSL *s)
if (s->cert->cert_flags & SSL_CERT_FLAGS_CHECK_TLS_STRICT &&
!tls1_check_chain(s, NULL, NULL, NULL, -2))
return 0;
-
return 1;
}