aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-11-28 01:21:59 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-12-01 10:28:31 +0100
commit9194a9959bedeeb54d935ddf9d49361ead5f922a (patch)
tree1ff879d705064c1f84cd7e717edb48e505c69672 /lib/urldata.h
parent744ee58386c41f487a8f62d5ce3f77a12b30ec9c (diff)
SSL: Avoid magic allocation of SSL backend specific data
Originally, my idea was to allocate the two structures (or more precisely, the connectdata structure and the four SSL backend-specific strucutres required for ssl[0..1] and proxy_ssl[0..1]) in one go, so that they all could be free()d together. However, getting the alignment right is tricky. Too tricky. So let's just bite the bullet and allocate the SSL backend-specific data separately. As a consequence, we now have to be very careful to release the memory allocated for the SSL backend-specific data whenever we release any connectdata. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Closes #2119
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index edd1fd9ac..2052a0299 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -860,6 +860,9 @@ struct connectdata {
#endif /* USE_RECV_BEFORE_SEND_WORKAROUND */
struct ssl_connect_data ssl[2]; /* this is for ssl-stuff */
struct ssl_connect_data proxy_ssl[2]; /* this is for proxy ssl-stuff */
+#ifdef USE_SSL
+ void *ssl_extra; /* separately allocated backend-specific data */
+#endif
struct ssl_primary_config ssl_config;
struct ssl_primary_config proxy_ssl_config;
bool tls_upgraded;