SSLClient/docs/html/class_s_s_l_session.html
2019-12-26 17:59:50 -05:00

228 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSLClient: SSLSession Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">SSLClient
&#160;<span id="projectnumber">v1.4.4</span>
</div>
<div id="projectbrief">Add TLS 1.2 functionality to any network library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_s_s_l_session.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_s_s_l_session-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">SSLSession Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This class stores values which allow <a class="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.
<a href="class_s_s_l_session.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_s_s_l_session_8h_source.html">SSLSession.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for SSLSession:</div>
<div class="dyncontent">
<div class="center">
<img src="class_s_s_l_session.png" alt=""/>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0c8e01b0944c1f4b0ec6d4c423c95b74"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_session.html#a0c8e01b0944c1f4b0ec6d4c423c95b74">SSLSession</a> (const char *hostname)</td></tr>
<tr class="memdesc:a0c8e01b0944c1f4b0ec6d4c423c95b74"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="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. <a href="#a0c8e01b0944c1f4b0ec6d4c423c95b74">More...</a><br /></td></tr>
<tr class="separator:a0c8e01b0944c1f4b0ec6d4c423c95b74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a825373c5ba1aa6c45e74dc8a72b21820"><td class="memItemLeft" align="right" valign="top">const String &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_session.html#a825373c5ba1aa6c45e74dc8a72b21820">get_hostname</a> () const</td></tr>
<tr class="memdesc:a825373c5ba1aa6c45e74dc8a72b21820"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the hostname string associated with this session. <a href="#a825373c5ba1aa6c45e74dc8a72b21820">More...</a><br /></td></tr>
<tr class="separator:a825373c5ba1aa6c45e74dc8a72b21820"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbe6549b55d50541d09a16f770e65afc"><td class="memItemLeft" align="right" valign="top">br_ssl_session_parameters *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_session.html#acbe6549b55d50541d09a16f770e65afc">to_br_session</a> ()</td></tr>
<tr class="memdesc:acbe6549b55d50541d09a16f770e65afc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the ::br_ssl_session_parameters component of this class. <a href="#acbe6549b55d50541d09a16f770e65afc">More...</a><br /></td></tr>
<tr class="separator:acbe6549b55d50541d09a16f770e65afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class stores values which allow <a class="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><a class="el" href="_s_s_l_session_8h.html">SSLSession.h</a></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 <a class="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, <a class="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>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a0c8e01b0944c1f4b0ec6d4c423c95b74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c8e01b0944c1f4b0ec6d4c423c95b74">&#9670;&nbsp;</a></span>SSLSession()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">SSLSession::SSLSession </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>hostname</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="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>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a825373c5ba1aa6c45e74dc8a72b21820"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a825373c5ba1aa6c45e74dc8a72b21820">&#9670;&nbsp;</a></span>get_hostname()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const String&amp; SSLSession::get_hostname </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the hostname string associated with this session. </p>
<dl class="section return"><dt>Returns</dt><dd>A String object or "" if there is no hostname </dd></dl>
<dl class="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>
</div>
</div>
<a id="acbe6549b55d50541d09a16f770e65afc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbe6549b55d50541d09a16f770e65afc">&#9670;&nbsp;</a></span>to_br_session()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">br_ssl_session_parameters* SSLSession::to_br_session </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a pointer to the ::br_ssl_session_parameters component of this class. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>C:/Users/Noah/Documents/Arduino/libraries/SSLClient/src/<a class="el" href="_s_s_l_session_8h_source.html">SSLSession.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_s_s_l_session.html">SSLSession</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>