output number of exts from tls_collect_extensions()
authorBenjamin Kaduk <bkaduk@akamai.com>
Mon, 23 Jan 2017 22:56:43 +0000 (16:56 -0600)
committerRichard Levitte <levitte@openssl.org>
Thu, 23 Feb 2017 18:24:36 +0000 (19:24 +0100)
commitfc5ece2ee4c7ef41759c2267eccbe08df3245721
treec51edcf2f36af416a4b2f500cdc6176ee1a52a45
parent46958a043d51633ed36bcfb13ff048a3381366a6
output number of exts from tls_collect_extensions()

Modify the API of tls_collect_extensions() to be able to output the number of
extensions that are known (i.e., the length of its 'res' output).  This number
can never be zero on a successful return due to the builtin extensions list,
but use a separate output variable so as to not overload the return value
semantics.

Having this value easily available will give consumers a way to avoid repeating
the calculation.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2279)
ssl/statem/extensions.c
ssl/statem/statem_clnt.c
ssl/statem/statem_locl.h
ssl/statem/statem_srvr.c