<p>This class stores values which allow <aclass="el"href="class_s_s_l_client.html"title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> to save and resume SSL sessions.
<trclass="memdesc:ae05648200cea66577f024d5d09a6fcbb"><tdclass="mdescLeft"> </td><tdclass="mdescRight"><aclass="el"href="class_s_s_l_session.html"title="This class stores values which allow SSLClient to save and resume SSL sessions.">SSLSession</a> constructor. <ahref="#ae05648200cea66577f024d5d09a6fcbb">More...</a><br/></td></tr>
<trclass="memdesc:a825373c5ba1aa6c45e74dc8a72b21820"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get the hostname string associated with this session. <ahref="#a825373c5ba1aa6c45e74dc8a72b21820">More...</a><br/></td></tr>
<trclass="memdesc:a878e1e8788634c5c42778369fbf7bab0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get ::IPAddress associated with this session. <ahref="#a878e1e8788634c5c42778369fbf7bab0">More...</a><br/></td></tr>
<trclass="memdesc:a2fa15ce0b7caae25dfb567954175257e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set the ip address and hostname of the session. <ahref="#a2fa15ce0b7caae25dfb567954175257e">More...</a><br/></td></tr>
<trclass="memdesc:a3305941fa615f7134526b718917716ee"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Delete the parameters and invalidate the session. <ahref="#a3305941fa615f7134526b718917716ee">More...</a><br/></td></tr>
<trclass="memdesc:acbe6549b55d50541d09a16f770e65afc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a pointer to the ::br_ssl_session_parameters component of this class. <ahref="#acbe6549b55d50541d09a16f770e65afc">More...</a><br/></td></tr>
<divclass="textblock"><p>This class stores values which allow <aclass="el"href="class_s_s_l_client.html"title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> to save and resume SSL sessions. </p>
<p>This file contains a simple utility class to store parameters about an SSL Session for reuse later.This class was created to extend the values stored in br_ssl_session_parameters, which allow BearSSL to resume an SSL session. When testing BearSSL's session resumption feature, it was observed that BearSSL can only resume a session that was was started with the same server. This becomes an issue when using repeated requests to a domain name which can resolve to multiple IP addresses ("api.github.com"), as the device will switch between two or three servers. Since BearSSL only stores one session at a time, this results in session resumption being few and far between.</p>
<p>To remedy this problem, an <aclass="el"href="class_s_s_l_session.html"title="This class stores values which allow SSLClient to save and resume SSL sessions.">SSLSession</a> stores the IPAddress and hostname, along with the parameters in br_ssl_session_parameters struct. Using this data, <aclass="el"href="class_s_s_l_client.html"title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> is able to remember which IPAddress is associated with which session, allowing it to reconnect to the last IPAddress, as opposed to any associated with the domain. </p>
<p><aclass="el"href="class_s_s_l_session.html"title="This class stores values which allow SSLClient to save and resume SSL sessions.">SSLSession</a> constructor. </p>
<p>Sets all parameters to zero, and invalidates the session </p>
</div>
</div>
<h2class="groupheader">Member Function Documentation</h2>
<p>Delete the parameters and invalidate the session. </p>
<p>Roughly equivalent to this_session = <aclass="el"href="class_s_s_l_session.html#ae05648200cea66577f024d5d09a6fcbb"title="SSLSession constructor.">SSLSession()</a>, however this function preserves the String object, allowing it to better handle the dynamic memory needed. </p>
<dlclass="section pre"><dt>Precondition</dt><dd>must check isValidSession before getting this value, as if this session in invalid this value is not guarenteed to be reset to "". </dd></dl>
<dlclass="section pre"><dt>Precondition</dt><dd>must check isValidSession before getting this value, as if this session in invalid this value is not guarenteed to be reset to #INADDR_NONE. </dd></dl>
<p>Set the ip address and hostname of the session. </p>
<p>This function stores the ip Address object and hostname object into the session object. If hostname is not null or ip address is not blank, and the ::br_ssl_session_parameters values are non-zero it then validates the session.</p>
<dlclass="section pre"><dt>Precondition</dt><dd>You must call ::br_ssl_engine_get_session_parameters with this session before calling this function. This is because there is no way to completely validate the ::br_ssl_session_parameters and the session may end up in a corrupted state if this is not observed.</dd></dl>
<tr><tdclass="paramname">ip</td><td>The IP address of the host associated with the session </td></tr>
<tr><tdclass="paramname">hostname</td><td>The string hostname ("www.google.com") associated with the session. Take care that this value is corrent, <aclass="el"href="class_s_s_l_session.html"title="This class stores values which allow SSLClient to save and resume SSL sessions.">SSLSession</a> performs no validation of the hostname. </td></tr>