From ab691309cee98d0cd5d7a44d8c8d514de6dfce66 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 26 Apr 2016 23:55:31 +0200 Subject: openssl: avoid BN_print a NULL bignum OpenSSL 1.1.0-pre seems to return NULL(?) for a whole lot of those numbers so make sure the function handles this. Reported-by: Linus Nordberg --- lib/vtls/openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/vtls') diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index e9acf9a03..2d18b1bc4 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -2228,7 +2228,8 @@ static void pubkey_show(struct SessionHandle *data, snprintf(namebuf, sizeof(namebuf), "%s(%s)", type, name); - BN_print(mem, bn); + if(bn) + BN_print(mem, bn); push_certinfo(namebuf, num); } -- cgit v1.2.3