diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-04-26 23:55:31 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-04-26 23:55:31 +0200 |
commit | ab691309cee98d0cd5d7a44d8c8d514de6dfce66 (patch) | |
tree | 035429dc4b34f33e5ffd6a77fd3469a322e9236e /lib/vtls | |
parent | c2b3f264cb5210f82bdc84a3b89250a611b68dd3 (diff) |
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
Diffstat (limited to 'lib/vtls')
-rw-r--r-- | lib/vtls/openssl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |