aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/statem
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2018-01-22 14:33:22 -0500
committerRich Salz <rsalz@openssl.org>2018-01-22 15:14:40 -0500
commit44f23cd281f2ec58c41c7a12b0f4aac10ccd8782 (patch)
treee11b814c14ddd05e1f253b5018359209e84860d6 /ssl/statem
parentbbc92cd129451649c785a17fcc09b07df1a5bd68 (diff)
downloadopenssl-44f23cd281f2ec58c41c7a12b0f4aac10ccd8782.tar.gz
Move fprintf after assignment to avoid crash.
Thanks to David Vernet for reporting this. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5140)
Diffstat (limited to 'ssl/statem')
-rw-r--r--ssl/statem/statem_clnt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index b47ae1ea10..40fedb225f 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -2280,9 +2280,6 @@ MSG_PROCESS_RETURN tls_process_key_exchange(SSL *s, PACKET *pkt)
/* SSLfatal() already called */
goto err;
}
-#ifdef SSL_DEBUG
- fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md));
-#endif
} else if (!tls1_set_peer_legacy_sigalg(s, pkey)) {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PROCESS_KEY_EXCHANGE,
ERR_R_INTERNAL_ERROR);
@@ -2294,6 +2291,10 @@ MSG_PROCESS_RETURN tls_process_key_exchange(SSL *s, PACKET *pkt)
ERR_R_INTERNAL_ERROR);
goto err;
}
+#ifdef SSL_DEBUG
+ if (SSL_USE_SIGALGS(s))
+ fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md));
+#endif
if (!PACKET_get_length_prefixed_2(pkt, &signature)
|| PACKET_remaining(pkt) != 0) {