245 lines
12 KiB
HTML
245 lines
12 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.11"/>
|
||
|
<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">
|
||
|
$(document).ready(initResizable);
|
||
|
$(window).load(resizeHeight);
|
||
|
</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>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { init_search(); });
|
||
|
</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
|
||
|
 <span id="projectnumber">v1.6.9</span>
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.11 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||
|
</ul>
|
||
|
</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">
|
||
|
$(document).ready(function(){initNavTree('class_s_s_l_session.html','');});
|
||
|
</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> |
|
||
|
<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 <<a class="el" href="_s_s_l_session_8h_source.html">SSLSession.h</a>></code></p>
|
||
|
<div class="dynheader">
|
||
|
Inheritance diagram for SSLSession:</div>
|
||
|
<div class="dyncontent">
|
||
|
<div class="center">
|
||
|
<img src="class_s_s_l_session.png" usemap="#SSLSession_map" alt=""/>
|
||
|
<map id="SSLSession_map" name="SSLSession_map">
|
||
|
</map>
|
||
|
</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"> </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"> </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"> </td></tr>
|
||
|
<tr class="memitem:a42aa22e9b6ef3a6d859cdbc21fef90e0"><td class="memItemLeft" align="right" valign="top">const String & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_session.html#a42aa22e9b6ef3a6d859cdbc21fef90e0">get_hostname</a> () const </td></tr>
|
||
|
<tr class="memdesc:a42aa22e9b6ef3a6d859cdbc21fef90e0"><td class="mdescLeft"> </td><td class="mdescRight">Get the hostname string associated with this session. <a href="#a42aa22e9b6ef3a6d859cdbc21fef90e0">More...</a><br /></td></tr>
|
||
|
<tr class="separator:a42aa22e9b6ef3a6d859cdbc21fef90e0"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:acbe6549b55d50541d09a16f770e65afc"><td class="memItemLeft" align="right" valign="top">br_ssl_session_parameters * </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"> </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"> </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 & Destructor Documentation</h2>
|
||
|
<a class="anchor" id="a0c8e01b0944c1f4b0ec6d4c423c95b74"></a>
|
||
|
<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 * </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 class="anchor" id="a42aa22e9b6ef3a6d859cdbc21fef90e0"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">const String& 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 class="anchor" id="acbe6549b55d50541d09a16f770e65afc"></a>
|
||
|
<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>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.11 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|