diff options
author | Dmitry Yakovlev <dewaffled@gmail.com> | 2018-08-14 07:24:46 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-08-14 08:01:14 -0400 |
commit | 572fa0249d1b863f180986369735b8048ef5f57a (patch) | |
tree | e8c43197187b289ff9428e9d0dc3de23a6c8e0ce /ssl | |
parent | 80162ad645f8982102d6994b9ea9ca6c371e933d (diff) | |
download | openssl-new-572fa0249d1b863f180986369735b8048ef5f57a.tar.gz |
Move SSL_DEBUG md fprintf after assignment
To avoid crash (same as #5138 fixed in 44f23cd)
CLA: trivial
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6937)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/statem/statem_lib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 74a2ec11de..d602846416 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -381,9 +381,6 @@ MSG_PROCESS_RETURN tls_process_cert_verify(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_CERT_VERIFY, ERR_R_INTERNAL_ERROR); @@ -396,6 +393,11 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt) goto err; } +#ifdef SSL_DEBUG + if (SSL_USE_SIGALGS(s)) + fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md)); +#endif + /* Check for broken implementations of GOST ciphersuites */ /* * If key is GOST and len is exactly 64 or 128, it is signature without |