[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Andy Polyakov
appro at openssl.org
Mon May 21 19:59:33 UTC 2018
The branch OpenSSL_1_1_0-stable has been updated
via 1caa3bbf25796c1fb4dcfee1a3d5a554b8a161f9 (commit)
from bbe75a29dfdb6561f21b7d010ac18c52da4beb78 (commit)
- Log -----------------------------------------------------------------
commit 1caa3bbf25796c1fb4dcfee1a3d5a554b8a161f9
Author: Tilman Keskinöz <arved at arved.at>
Date: Thu May 17 13:04:31 2018 +0200
ssl/ssl_txt: fix NULL-check
NULL-check for cipher is redundant, instead check if cipher->name is NULL
While here fix formatting of BIO_printf calls as suggested by Andy Polyakov.
CLA: trivial
Reviewed-by: Andy Polyakov <appro at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6282)
(cherry picked from commit d61e6040a02464f1dd41942ee1e17ef59822102d)
-----------------------------------------------------------------------
Summary of changes:
ssl/ssl_txt.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c
index dbbf9d9..0534c8f 100644
--- a/ssl/ssl_txt.c
+++ b/ssl/ssl_txt.c
@@ -70,18 +70,18 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x)
if (x->cipher == NULL) {
if (((x->cipher_id) & 0xff000000) == 0x02000000) {
- if (BIO_printf
- (bp, " Cipher : %06lX\n", x->cipher_id & 0xffffff) <= 0)
+ if (BIO_printf(bp, " Cipher : %06lX\n",
+ x->cipher_id & 0xffffff) <= 0)
goto err;
} else {
- if (BIO_printf
- (bp, " Cipher : %04lX\n", x->cipher_id & 0xffff) <= 0)
+ if (BIO_printf(bp, " Cipher : %04lX\n",
+ x->cipher_id & 0xffff) <= 0)
goto err;
}
} else {
- if (BIO_printf
- (bp, " Cipher : %s\n",
- ((x->cipher == NULL) ? "unknown" : x->cipher->name)) <= 0)
+ if (BIO_printf(bp, " Cipher : %s\n",
+ ((x->cipher->name == NULL) ? "unknown"
+ : x->cipher->name)) <= 0)
goto err;
}
if (BIO_puts(bp, " Session-ID: ") <= 0)
More information about the openssl-commits
mailing list