Normalize on session_ctx for stats where possible
authorBenjamin Kaduk <bkaduk@akamai.com>
Tue, 17 Oct 2017 20:28:42 +0000 (15:28 -0500)
committerBen Kaduk <kaduk@mit.edu>
Mon, 30 Oct 2017 15:21:10 +0000 (10:21 -0500)
commit0e6161bcae451ed17346c51db1ddc61fea5f3ec2
tree9ba1609e9cce9f7034cd611ad0d07331d94e305f
parent1fcb4e4d521971caccb61df215541bf55f7ca9a5
Normalize on session_ctx for stats where possible

For client SSL objects and before any callbacks have had a chance
to be called, we can write the stats accesses using the session_ctx,
which makes sense given that these values are all prefixed with
"sess_".

For servers after a client_hello or servername callback has been
called, retain the existing behavior of modifying the statistics
for the current (non-session) context.  This has some value,
in that it allows the statistics to be viewed on a per-vhost level.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/4549)
ssl/statem/statem_clnt.c
ssl/statem/statem_lib.c