vtls: Only call add/getsession if session id is enabled
authorJay Satiro <raysatiro@yahoo.com>
Mon, 13 Jun 2016 03:47:12 +0000 (23:47 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 22 Jun 2016 06:33:29 +0000 (02:33 -0400)
commit04b4ee5498b14d320e3b375c64d0162cc2b53c99
tree8b9c10dfced26473f014bd8bcf37296237f35e2a
parent046c2c85c4c365d4ae8a621d7886caf96f51e0e7
vtls: Only call add/getsession if session id is enabled

Prior to this change we called Curl_ssl_getsessionid and
Curl_ssl_addsessionid regardless of whether session ID reusing was
enabled. According to comments that is in case session ID reuse was
disabled but then later enabled.

The old way was not intuitive and probably not something users expected.
When a user disables session ID caching I'd guess they don't expect the
session ID to be cached anyway in case the caching is later enabled.
lib/vtls/axtls.c
lib/vtls/cyassl.c
lib/vtls/darwinssl.c
lib/vtls/gtls.c
lib/vtls/mbedtls.c
lib/vtls/openssl.c
lib/vtls/polarssl.c
lib/vtls/schannel.c
lib/vtls/vtls.c