regenerated documentation
This commit is contained in:
parent
5c643d015e
commit
431df02b5b
23 changed files with 416 additions and 147 deletions
|
@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('class_s_s_l_client.html','');});
|
|||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>The main <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> class Check out <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> for more info.
|
||||
<p>The main <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> class. Check out <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> for more info.
|
||||
<a href="class_s_s_l_client.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="_s_s_l_client_8h_source.html">SSLClient.h</a>></code></p>
|
||||
|
@ -113,7 +113,7 @@ Inheritance diagram for SSLClient< C, SessionCache >:</div>
|
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:ae9a7509bc8a18f67e286547c19deb3c0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ae9a7509bc8a18f67e286547c19deb3c0">SSLClient</a> (const C &client, const br_x509_trust_anchor *trust_anchors, const size_t trust_anchors_num, const int analog_pin, const <a class="el" href="_s_s_l_client_impl_8h.html#ab658e6d84759440dbf3c890446075395">DebugLevel</a> debug=<a class="el" href="_s_s_l_client_impl_8h.html#ab658e6d84759440dbf3c890446075395a86c8fdfc38831619d5ed73dff5b0911d">SSL_WARN</a>)</td></tr>
|
||||
<tr class="memdesc:ae9a7509bc8a18f67e286547c19deb3c0"><td class="mdescLeft"> </td><td class="mdescRight">Initialize <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> with all of the prerequisites needed. <a href="#ae9a7509bc8a18f67e286547c19deb3c0">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae9a7509bc8a18f67e286547c19deb3c0"><td class="mdescLeft"> </td><td class="mdescRight">Initialize <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> with all of the prerequisites needed. <a href="#ae9a7509bc8a18f67e286547c19deb3c0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae9a7509bc8a18f67e286547c19deb3c0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae6540b9a02f1392bf2ac48421189f70e"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ae6540b9a02f1392bf2ac48421189f70e">connect</a> (IPAddress ip, uint16_t port)</td></tr>
|
||||
<tr class="memdesc:ae6540b9a02f1392bf2ac48421189f70e"><td class="mdescLeft"> </td><td class="mdescRight">Connect over SSL to a host specified by an IP address. <a href="#ae6540b9a02f1392bf2ac48421189f70e">More...</a><br /></td></tr>
|
||||
|
@ -127,28 +127,28 @@ Public Member Functions</h2></td></tr>
|
|||
<tr class="memdesc:a3a48b190985cdea2eba79ef0bdc80461"><td class="mdescLeft"> </td><td class="mdescRight">Write some bytes to the SSL connection. <a href="#a3a48b190985cdea2eba79ef0bdc80461">More...</a><br /></td></tr>
|
||||
<tr class="separator:a3a48b190985cdea2eba79ef0bdc80461"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a40ec85568d0aec376219125b604dbc29"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29">available</a> ()</td></tr>
|
||||
<tr class="memdesc:a40ec85568d0aec376219125b604dbc29"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of bytes availible to read from the SSL Socket. <a href="#a40ec85568d0aec376219125b604dbc29">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a40ec85568d0aec376219125b604dbc29"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of bytes available to read from the data that has been received and decrypted. <a href="#a40ec85568d0aec376219125b604dbc29">More...</a><br /></td></tr>
|
||||
<tr class="separator:a40ec85568d0aec376219125b604dbc29"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac70b900ff798f9fd33f6367fcc9fad77"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ac70b900ff798f9fd33f6367fcc9fad77">read</a> ()</td></tr>
|
||||
<tr class="memdesc:ac70b900ff798f9fd33f6367fcc9fad77"><td class="mdescLeft"> </td><td class="mdescRight">Read a single byte, or -1 if none is available. <a href="#ac70b900ff798f9fd33f6367fcc9fad77">More...</a><br /></td></tr>
|
||||
<tr class="separator:ac70b900ff798f9fd33f6367fcc9fad77"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae31dd88a1af8ec3794fb48f26a3dd4bf"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ae31dd88a1af8ec3794fb48f26a3dd4bf">read</a> (uint8_t *buf, size_t size)</td></tr>
|
||||
<tr class="memdesc:ae31dd88a1af8ec3794fb48f26a3dd4bf"><td class="mdescLeft"> </td><td class="mdescRight">Read size bytes from the SSL socket buffer, copying them into *buf, and return the number of bytes read. <a href="#ae31dd88a1af8ec3794fb48f26a3dd4bf">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae31dd88a1af8ec3794fb48f26a3dd4bf"><td class="mdescLeft"> </td><td class="mdescRight">Read size bytes from the SSL client buffer, copying them into *buf, and return the number of bytes read. <a href="#ae31dd88a1af8ec3794fb48f26a3dd4bf">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae31dd88a1af8ec3794fb48f26a3dd4bf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a227b1cbbe91bcb21153c09f97d0dd484"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a227b1cbbe91bcb21153c09f97d0dd484">peek</a> ()</td></tr>
|
||||
<tr class="memdesc:a227b1cbbe91bcb21153c09f97d0dd484"><td class="mdescLeft"> </td><td class="mdescRight">view the first byte of the buffer, without removing it from the <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> Buffer The implementation for this function can be found in SSLClientImpl::peek <a href="#a227b1cbbe91bcb21153c09f97d0dd484">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a227b1cbbe91bcb21153c09f97d0dd484"><td class="mdescLeft"> </td><td class="mdescRight">View the first byte of the buffer, without removing it from the <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> Buffer. <a href="#a227b1cbbe91bcb21153c09f97d0dd484">More...</a><br /></td></tr>
|
||||
<tr class="separator:a227b1cbbe91bcb21153c09f97d0dd484"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a51eb668f6a328a6a66298c6bc1361d41"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a51eb668f6a328a6a66298c6bc1361d41">flush</a> ()</td></tr>
|
||||
<tr class="memdesc:a51eb668f6a328a6a66298c6bc1361d41"><td class="mdescLeft"> </td><td class="mdescRight">Force writing the buffered bytes from <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a> to the network. This function is blocking until all bytes from the buffer are written. For an explanation of how writing with <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> works, please see <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a>. The implementation for this function can be found in SSLClientImpl::flush. <a href="#a51eb668f6a328a6a66298c6bc1361d41">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a51eb668f6a328a6a66298c6bc1361d41"><td class="mdescLeft"> </td><td class="mdescRight">Force writing the buffered bytes from <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a> to the network. <a href="#a51eb668f6a328a6a66298c6bc1361d41">More...</a><br /></td></tr>
|
||||
<tr class="separator:a51eb668f6a328a6a66298c6bc1361d41"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a158d87df3fe118b7565a19b72f310322"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a158d87df3fe118b7565a19b72f310322">stop</a> ()</td></tr>
|
||||
<tr class="memdesc:a158d87df3fe118b7565a19b72f310322"><td class="mdescLeft"> </td><td class="mdescRight">Close the connection If the SSL session is still active, all incoming data is discarded and BearSSL will attempt to close the session gracefully (will write to the network), and then call m_client::stop. If the session is not active or an error was encountered previously, this function will simply call m_client::stop. The implementation for this function can be found in SSLClientImpl::peek. <a href="#a158d87df3fe118b7565a19b72f310322">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a158d87df3fe118b7565a19b72f310322"><td class="mdescLeft"> </td><td class="mdescRight">Close the connection. <a href="#a158d87df3fe118b7565a19b72f310322">More...</a><br /></td></tr>
|
||||
<tr class="separator:a158d87df3fe118b7565a19b72f310322"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7318aadc0ec9775bffaaac0b1f00aaf8"><td class="memItemLeft" align="right" valign="top">virtual uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8">connected</a> ()</td></tr>
|
||||
<tr class="memdesc:a7318aadc0ec9775bffaaac0b1f00aaf8"><td class="mdescLeft"> </td><td class="mdescRight">Check if the device is connected. Use this function to determine if <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 still connected and a SSL connection is active. It should be noted that <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a> should be preferred over this function for rapid polling–both functions send and receive data with the SSLClient::m_client device, however <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a> has some delays built in to protect SSLClient::m_client from being polled too frequently. <a href="#a7318aadc0ec9775bffaaac0b1f00aaf8">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a7318aadc0ec9775bffaaac0b1f00aaf8"><td class="mdescLeft"> </td><td class="mdescRight">Check if the device is connected. <a href="#a7318aadc0ec9775bffaaac0b1f00aaf8">More...</a><br /></td></tr>
|
||||
<tr class="separator:a7318aadc0ec9775bffaaac0b1f00aaf8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae3f27a36ff9c0cd1e2bea5e1708b6e4f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_s_s_l_session.html">SSLSession</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ae3f27a36ff9c0cd1e2bea5e1708b6e4f">getSession</a> (const char *host, const IPAddress &addr)</td></tr>
|
||||
<tr class="memdesc:ae3f27a36ff9c0cd1e2bea5e1708b6e4f"><td class="mdescLeft"> </td><td class="mdescRight">Get a session reference corresponding to a host and IP, or a reference to a empty session if none exist. <a href="#ae3f27a36ff9c0cd1e2bea5e1708b6e4f">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae3f27a36ff9c0cd1e2bea5e1708b6e4f"><td class="mdescLeft"> </td><td class="mdescRight">Gets a session reference corresponding to a host and IP, or a reference to a empty session if none exist. <a href="#ae3f27a36ff9c0cd1e2bea5e1708b6e4f">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae3f27a36ff9c0cd1e2bea5e1708b6e4f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0000d7f1e8656cf4a506a98133391fe0"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a0000d7f1e8656cf4a506a98133391fe0">removeSession</a> (const char *host, const IPAddress &addr)</td></tr>
|
||||
<tr class="memdesc:a0000d7f1e8656cf4a506a98133391fe0"><td class="mdescLeft"> </td><td class="mdescRight">Clear the session corresponding to a host and IP. <a href="#a0000d7f1e8656cf4a506a98133391fe0">More...</a><br /></td></tr>
|
||||
|
@ -157,17 +157,17 @@ Public Member Functions</h2></td></tr>
|
|||
<tr class="memdesc:a36bb344866e4cbcba3bbfcf4d33e5187"><td class="mdescLeft"> </td><td class="mdescRight">Get the maximum number of SSL sessions that can be stored at once. <a href="#a36bb344866e4cbcba3bbfcf4d33e5187">More...</a><br /></td></tr>
|
||||
<tr class="separator:a36bb344866e4cbcba3bbfcf4d33e5187"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a319a722dae252efdd85fdbaf5c7fbf17"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a319a722dae252efdd85fdbaf5c7fbf17">operator bool</a> ()</td></tr>
|
||||
<tr class="memdesc:a319a722dae252efdd85fdbaf5c7fbf17"><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected. Use this function to determine if SSLClient is still connected and ...">SSLClient::connected()</a> > 0. <a href="#a319a722dae252efdd85fdbaf5c7fbf17">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a319a722dae252efdd85fdbaf5c7fbf17"><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected.">SSLClient::connected()</a> > 0. <a href="#a319a722dae252efdd85fdbaf5c7fbf17">More...</a><br /></td></tr>
|
||||
<tr class="separator:a319a722dae252efdd85fdbaf5c7fbf17"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6fb2e8a1cc54dd82a72217e5c4533e02"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a6fb2e8a1cc54dd82a72217e5c4533e02">operator==</a> (const bool value)</td></tr>
|
||||
<tr class="separator:a6fb2e8a1cc54dd82a72217e5c4533e02"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9a060e49d0685c6c6795558e41cd3323"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a9a060e49d0685c6c6795558e41cd3323">operator!=</a> (const bool value)</td></tr>
|
||||
<tr class="separator:a9a060e49d0685c6c6795558e41cd3323"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a26f9418e33d4ca459f78de98d3af43bb"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a26f9418e33d4ca459f78de98d3af43bb">operator==</a> (const C &rhs)</td></tr>
|
||||
<tr class="memdesc:a26f9418e33d4ca459f78de98d3af43bb"><td class="mdescLeft"> </td><td class="mdescRight">Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> objects have the same underlying client object. <a href="#a26f9418e33d4ca459f78de98d3af43bb">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a26f9418e33d4ca459f78de98d3af43bb"><td class="mdescLeft"> </td><td class="mdescRight">Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> objects have the same underlying client object. <a href="#a26f9418e33d4ca459f78de98d3af43bb">More...</a><br /></td></tr>
|
||||
<tr class="separator:a26f9418e33d4ca459f78de98d3af43bb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a518f4ed733814f2f4a8c7f838555eb35"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a518f4ed733814f2f4a8c7f838555eb35">operator!=</a> (const C &rhs)</td></tr>
|
||||
<tr class="memdesc:a518f4ed733814f2f4a8c7f838555eb35"><td class="mdescLeft"> </td><td class="mdescRight">Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> objects do not have the same underlying client object. <a href="#a518f4ed733814f2f4a8c7f838555eb35">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a518f4ed733814f2f4a8c7f838555eb35"><td class="mdescLeft"> </td><td class="mdescRight">Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> objects do not have the same underlying client object. <a href="#a518f4ed733814f2f4a8c7f838555eb35">More...</a><br /></td></tr>
|
||||
<tr class="separator:a518f4ed733814f2f4a8c7f838555eb35"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac725067566ee411680c88575c148300b"><td class="memItemLeft" align="right" valign="top">virtual uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ac725067566ee411680c88575c148300b">localPort</a> ()</td></tr>
|
||||
<tr class="memdesc:ac725067566ee411680c88575c148300b"><td class="mdescLeft"> </td><td class="mdescRight">Returns the local port, C::localPort exists. Else return 0. <a href="#ac725067566ee411680c88575c148300b">More...</a><br /></td></tr>
|
||||
|
@ -179,7 +179,7 @@ Public Member Functions</h2></td></tr>
|
|||
<tr class="memdesc:ae8bd9420fec3b11f855729c4ecfe1c2c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the remote port, if C::remotePort exists. Else return 0. <a href="#ae8bd9420fec3b11f855729c4ecfe1c2c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae8bd9420fec3b11f855729c4ecfe1c2c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:afd0d4d2c98433d60897d8828d8047d41"><td class="memItemLeft" align="right" valign="top">C & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#afd0d4d2c98433d60897d8828d8047d41">getClient</a> ()</td></tr>
|
||||
<tr class="memdesc:afd0d4d2c98433d60897d8828d8047d41"><td class="mdescLeft"> </td><td class="mdescRight">returns a reference to the client object stored in this class. Take care not to break it. <a href="#afd0d4d2c98433d60897d8828d8047d41">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:afd0d4d2c98433d60897d8828d8047d41"><td class="mdescLeft"> </td><td class="mdescRight">Returns a reference to the client object stored in this class. Take care not to break it. <a href="#afd0d4d2c98433d60897d8828d8047d41">More...</a><br /></td></tr>
|
||||
<tr class="separator:afd0d4d2c98433d60897d8828d8047d41"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="inherit_header pub_methods_class_s_s_l_client_impl"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_s_s_l_client_impl')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="class_s_s_l_client_impl.html">SSLClientImpl</a></td></tr>
|
||||
<tr class="memitem:a2b0b9043c8252871272bf6ba199ab67b inherit pub_methods_class_s_s_l_client_impl"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client_impl.html#a2b0b9043c8252871272bf6ba199ab67b">SSLClientImpl</a> (const br_x509_trust_anchor *trust_anchors, const size_t trust_anchors_num, const int analog_pin, const <a class="el" href="_s_s_l_client_impl_8h.html#ab658e6d84759440dbf3c890446075395">DebugLevel</a> debug)</td></tr>
|
||||
|
@ -210,12 +210,12 @@ Public Member Functions</h2></td></tr>
|
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
|
||||
Protected Member Functions</h2></td></tr>
|
||||
<tr class="memitem:ab3ebfbca41a56bfa11e34aac2c2e0106"><td class="memItemLeft" align="right" valign="top">virtual Client & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ab3ebfbca41a56bfa11e34aac2c2e0106">get_arduino_client</a> ()</td></tr>
|
||||
<tr class="memdesc:ab3ebfbca41a56bfa11e34aac2c2e0106"><td class="mdescLeft"> </td><td class="mdescRight">return an instance of m_client that is polymorphic and can be used by <a class="el" href="class_s_s_l_client_impl.html" title="Implementation code to be inherited by SSLClient.">SSLClientImpl</a> <a href="#ab3ebfbca41a56bfa11e34aac2c2e0106">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ab3ebfbca41a56bfa11e34aac2c2e0106"><td class="mdescLeft"> </td><td class="mdescRight">Returns an instance of m_client that is polymorphic and can be used by <a class="el" href="class_s_s_l_client_impl.html" title="Implementation code to be inherited by SSLClient.">SSLClientImpl</a>. <a href="#ab3ebfbca41a56bfa11e34aac2c2e0106">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab3ebfbca41a56bfa11e34aac2c2e0106"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a20742b36588c45435139a4f47fe0f1f6"><td class="memItemLeft" align="right" valign="top">virtual const Client & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#a20742b36588c45435139a4f47fe0f1f6">get_arduino_client</a> () const</td></tr>
|
||||
<tr class="separator:a20742b36588c45435139a4f47fe0f1f6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aaa52b481eb1d36a0ae1d208daa2fec51"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_s_s_l_session.html">SSLSession</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#aaa52b481eb1d36a0ae1d208daa2fec51">get_session_array</a> ()</td></tr>
|
||||
<tr class="memdesc:aaa52b481eb1d36a0ae1d208daa2fec51"><td class="mdescLeft"> </td><td class="mdescRight">return an instance of the session array that is on the stack <a href="#aaa52b481eb1d36a0ae1d208daa2fec51">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aaa52b481eb1d36a0ae1d208daa2fec51"><td class="mdescLeft"> </td><td class="mdescRight">Returns an instance of the session array that is on the stack. <a href="#aaa52b481eb1d36a0ae1d208daa2fec51">More...</a><br /></td></tr>
|
||||
<tr class="separator:aaa52b481eb1d36a0ae1d208daa2fec51"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab076a76b142b553c0dfd29174d4e17e7"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="class_s_s_l_session.html">SSLSession</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_s_l_client.html#ab076a76b142b553c0dfd29174d4e17e7">get_session_array</a> () const</td></tr>
|
||||
<tr class="separator:ab076a76b142b553c0dfd29174d4e17e7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
@ -248,7 +248,7 @@ Protected Member Functions</h2></td></tr>
|
|||
<div class="textblock"><h3>template<class C, size_t SessionCache = 1><br />
|
||||
class SSLClient< C, SessionCache ></h3>
|
||||
|
||||
<p>The main <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> class Check out <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> for more info. </p>
|
||||
<p>The main <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> class. Check out <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> for more info. </p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="ae9a7509bc8a18f67e286547c19deb3c0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae9a7509bc8a18f67e286547c19deb3c0">◆ </a></span>SSLClient()</h2>
|
||||
|
@ -304,13 +304,13 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Initialize <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> with all of the prerequisites needed. </p>
|
||||
<p>Initialize <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> with all of the prerequisites needed. </p>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd>You will need to generate an array of trust_anchors (root certificates) based off of the domains you want to make SSL connections to. Check out the <a class="el" href="_trust_anchors_8md.html">TrustAnchors.md</a> file for more info. </dd>
|
||||
<dd>
|
||||
The analog_pin should be set to input.</dd></dl>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">client</td><td>The base network device to create an SSL socket on. This object will be copied and the copy will be stored in <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a>. </td></tr>
|
||||
<tr><td class="paramname">client</td><td>The base network device to create an SSL socket on. This object will be copied and the copy will be stored in <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a>. </td></tr>
|
||||
<tr><td class="paramname">trust_anchors</td><td>Trust anchors used in the verification of the SSL server certificate. Check out <a class="el" href="_trust_anchors_8md.html">TrustAnchors.md</a> for more info. </td></tr>
|
||||
<tr><td class="paramname">trust_anchors_num</td><td>The number of objects in the trust_anchors array. </td></tr>
|
||||
<tr><td class="paramname">analog_pin</td><td>An analog pin to pull random bytes from, used in seeding the RNG. </td></tr>
|
||||
|
@ -347,10 +347,10 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the number of bytes availible to read from the SSL Socket. </p>
|
||||
<p>This function updates the state of the SSL engine (including writing any data, see <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a>) and as a result should be called periodically when expecting data. Additionally, since if there are no bytes and if <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected. Use this function to determine if SSLClient is still connected and ...">SSLClient::connected</a> is false this function returns zero (this same behavior is found in EthernetClient), it is prudent to ensure in your own code that the preconditions are met before checking this function to prevent an ambiguous result.</p>
|
||||
<p>Returns the number of bytes available to read from the data that has been received and decrypted. </p>
|
||||
<p>This function updates the state of the SSL engine (including writing any data, see <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a>) and as a result should be called periodically when expecting data. Additionally, since if there are no bytes and if <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected.">SSLClient::connected</a> is false this function returns zero (this same behavior is found in EthernetClient), it is prudent to ensure in your own code that the preconditions are met before checking this function to prevent an ambiguous result.</p>
|
||||
<p>The implementation for this function can be found in SSLClientImpl::available</p>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected. Use this function to determine if SSLClient is still connected and ...">SSLClient::connected</a> must be true.</dd></dl>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected.">SSLClient::connected</a> must be true.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The number of bytes available (can be zero), or zero if any of the pre conditions aren't satisfied. </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -392,15 +392,15 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Connect over SSL to a host specified by an IP address. </p>
|
||||
<p>SSLClient::connect(host, port) should be preferred over this function, as verifying the domain name is a step in ensuring the certificate is legitimate, which is important to the security of the device. Additionally, SSL sessions cannot be resumed, which can drastically increase initial connect time.</p>
|
||||
<p>This function initializes the socket by calling m_client::connect(IPAddress, uint16_t) with the parameters supplied, then once the socket uses BearSSL to to complete a SSL handshake. Due to the design of the SSL standard, this function will probably take an extended period (1-4sec) to negotiate the handshake and finish the connection. This function runs until the SSL handshake succeeds or fails.</p>
|
||||
<p>SSL requires the client to generate some random bits (to be later combined with some random bits from the server), so <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> uses the least significant bits from the analog pin supplied in the constructor. The random bits are generated from 16 consecutive analogReads, and given to BearSSL before the handshake starts.</p>
|
||||
<p>SSLClient::connect(host, port) should be preferred over this function, as verifying the domain name is a step in ensuring the certificate is legitimate, which is important to the security of the device. Additionally, SSL sessions cannot be resumed when using this function, which can drastically increase initial connect time.</p>
|
||||
<p>This function initializes the socket by calling m_client::connect(IPAddress, uint16_t) with the parameters supplied, then once the socket is open, uses BearSSL to to complete a SSL handshake. Due to the design of the SSL standard, this function will probably take an extended period (1-4sec) to negotiate the handshake and finish the connection. This function runs until the SSL handshake succeeds or fails.</p>
|
||||
<p>SSL requires the client to generate some random bits (to be later combined with some random bits from the server), so <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> uses the least significant bits from the analog pin supplied in the constructor. The random bits are generated from 16 consecutive analogReads, and given to BearSSL before the handshake starts.</p>
|
||||
<p>The implementation for this function can be found in <a class="el" href="class_s_s_l_client_impl.html#aa5c14ecf301c268306946c85825e565b">SSLClientImpl::connect_impl(IPAddress, uint16_t)</a>.</p>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd>The underlying client object (passed in through the constructor) is in a non- error state, and must be able to access the IP. </dd>
|
||||
<dd>
|
||||
<a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> can only have one connection at a time, so the client object must not already be connected. </dd>
|
||||
<a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> can only have one connection at a time, so the client object must not already be connected. </dd>
|
||||
<dd>
|
||||
There must be sufficient memory available on the device to verify the certificate (if the free memory drops below 8000 bytes during certain points in the connection, <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> will fail). </dd>
|
||||
There must be sufficient memory available on the device to verify the certificate (if the free memory drops below 8000 bytes during certain points in the connection, <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> will fail). </dd>
|
||||
<dd>
|
||||
There must be a trust anchor given to the constructor that corresponds to the certificate provided by the IP address being connected to. For more information check out <a class="el" href="_trust_anchors_8md.html">TrustAnchors.md</a> .</dd></dl>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
|
@ -451,15 +451,15 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Connect over SSL to a host specified by a hostname. </p>
|
||||
<p>This function initializes the socket by calling m_client::connect(const char*, uint16_t) with the parameters supplied, then once the socket is open uses BearSSL to to complete a SSL handshake. This function runs until the SSL handshake succeeds or fails.</p>
|
||||
<p>SSL requires the client to generate some random bits (to be later combined with some random bits from the server), so <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> uses the least significant bits from the analog pin supplied in the constructor. The random bits are generated from 16 consecutive analogReads, and given to BearSSL before the handshake starts.</p>
|
||||
<p>This function initializes the socket by calling m_client::connect(const char*, uint16_t) with the parameters supplied, then once the socket is open, uses BearSSL to complete a SSL handshake. This function runs until the SSL handshake succeeds or fails.</p>
|
||||
<p>SSL requires the client to generate some random bits (to be later combined with some random bits from the server), so <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> uses the least significant bits from the analog pin supplied in the constructor. The random bits are generated from 16 consecutive analogReads, and given to BearSSL before the handshake starts.</p>
|
||||
<p>This function will usually take around 4-10 seconds. If possible, this function also attempts to resume the SSL session if one is present matching the hostname string, which will reduce connection time to 100-500ms. To read more about this functionality, check out Session Caching in the README.</p>
|
||||
<p>The implementation for this function can be found in <a class="el" href="class_s_s_l_client_impl.html#ae6c947ad92979ab99364428004abbeba">SSLClientImpl::connect_impl(const char*, uint16_t)</a></p>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd>The underlying client object (passed in through the constructor) is in a non- error state, and must be able to access the IP. </dd>
|
||||
<dd>
|
||||
<a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> can only have one connection at a time, so the client object must not already be connected. </dd>
|
||||
<a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> can only have one connection at a time, so the client object must not already be connected. </dd>
|
||||
<dd>
|
||||
There must be sufficient memory available on the device to verify the certificate (if the free memory drops below 8000 bytes during certain points in the connection, <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> will fail). </dd>
|
||||
There must be sufficient memory available on the device to verify the certificate (if the free memory drops below 8000 bytes during certain points in the connection, <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> will fail). </dd>
|
||||
<dd>
|
||||
There must be a trust anchor given to the constructor that corresponds to the certificate provided by the IP address being connected to. For more information check out <a class="el" href="_trust_anchors_8md.html">TrustAnchors.md</a> .</dd></dl>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
|
@ -498,7 +498,8 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Check if the device is connected. Use this function to determine if <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 still connected and a SSL connection is active. It should be noted that <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a> should be preferred over this function for rapid polling–both functions send and receive data with the SSLClient::m_client device, however <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a> has some delays built in to protect SSLClient::m_client from being polled too frequently. </p>
|
||||
<p>Check if the device is connected. </p>
|
||||
<p>Use this function to determine if <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 still connected and a SSL connection is active. It should be noted that <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes available to read from the data that has been received and decrypted.">SSLClient::available</a> should be preferred over this function for rapid polling–both functions send and receive data with the SSLClient::m_client device, however <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes available to read from the data that has been received and decrypted.">SSLClient::available</a> has some delays built in to protect SSLClient::m_client from being polled too frequently.</p>
|
||||
<p>The implementation for this function can be found in <a class="el" href="class_s_s_l_client_impl.html#a957984fa392550a7df86f758e9b14bfb">SSLClientImpl::connected_impl</a>.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>1 if connected, 0 if not </dd></dl>
|
||||
|
||||
|
@ -529,7 +530,8 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Force writing the buffered bytes from <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a> to the network. This function is blocking until all bytes from the buffer are written. For an explanation of how writing with <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> works, please see <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a>. The implementation for this function can be found in SSLClientImpl::flush. </p>
|
||||
<p>Force writing the buffered bytes from <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a> to the network. </p>
|
||||
<p>This function is blocking until all bytes from the buffer are written. For an explanation of how writing with <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> works, please see <a class="el" href="class_s_s_l_client.html#a0699ff4b966162cba2ef59ff4a287270">SSLClient::write</a>. The implementation for this function can be found in SSLClientImpl::flush. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -558,7 +560,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>return an instance of m_client that is polymorphic and can be used by <a class="el" href="class_s_s_l_client_impl.html" title="Implementation code to be inherited by SSLClient.">SSLClientImpl</a> </p>
|
||||
<p>Returns an instance of m_client that is polymorphic and can be used by <a class="el" href="class_s_s_l_client_impl.html" title="Implementation code to be inherited by SSLClient.">SSLClientImpl</a>. </p>
|
||||
|
||||
<p>Implements <a class="el" href="class_s_s_l_client_impl.html#a20dd9a9794b95719e6f3df8cb39126e3">SSLClientImpl</a>.</p>
|
||||
|
||||
|
@ -618,7 +620,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>return an instance of the session array that is on the stack </p>
|
||||
<p>Returns an instance of the session array that is on the stack. </p>
|
||||
|
||||
<p>Implements <a class="el" href="class_s_s_l_client_impl.html#a44cfafd6f5cdcaa5dbac22961ab3a58b">SSLClientImpl</a>.</p>
|
||||
|
||||
|
@ -678,7 +680,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>returns a reference to the client object stored in this class. Take care not to break it. </p>
|
||||
<p>Returns a reference to the client object stored in this class. Take care not to break it. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -718,7 +720,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get a session reference corresponding to a host and IP, or a reference to a empty session if none exist. </p>
|
||||
<p>Gets a session reference corresponding to a host and IP, or a reference to a empty session if none exist. </p>
|
||||
<p>If no session corresponding to the host and IP exist, then this function will cycle through sessions in a rotating order. This allows the session cache to continually store sessions, however it will also result in old sessions being cleared and returned. In general, it is a good idea to use a SessionCache size equal to the number of domains you plan on connecting to.</p>
|
||||
<p>The implementation for this function can be found at <a class="el" href="class_s_s_l_client_impl.html#ab4e38d4319ec504395d67d2ab21a639e">SSLClientImpl::get_session_impl</a>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
|
@ -820,7 +822,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Equivalent to <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected. Use this function to determine if SSLClient is still connected and ...">SSLClient::connected()</a> > 0. </p>
|
||||
<p>Equivalent to <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected.">SSLClient::connected()</a> > 0. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>true if connected, false if not </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -880,7 +882,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> objects do not have the same underlying client object. </p>
|
||||
<p>Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> objects do not have the same underlying client object. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -939,7 +941,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> objects have the same underlying client object. </p>
|
||||
<p>Returns whether or not two <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> objects have the same underlying client object. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -968,8 +970,8 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>view the first byte of the buffer, without removing it from the <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> Buffer The implementation for this function can be found in SSLClientImpl::peek </p>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a> must be >0 </dd></dl>
|
||||
<p>View the first byte of the buffer, without removing it from the <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> Buffer. </p>
|
||||
<p>The implementation for this function can be found in SSLClientImpl::peek </p><dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes available to read from the data that has been received and decrypted.">SSLClient::available</a> must be >0 </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The first byte received, or -1 if the preconditions are not satisfied (warning: do not use if your data may be -1, as the return value is ambiguous) </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -1000,7 +1002,7 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Read a single byte, or -1 if none is available. </p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_s_s_l_client.html#ae31dd88a1af8ec3794fb48f26a3dd4bf" title="Read size bytes from the SSL socket buffer, copying them into *buf, and return the number of bytes re...">SSLClient::read(uint8_t*, size_t)</a> </dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_s_s_l_client.html#ae31dd88a1af8ec3794fb48f26a3dd4bf" title="Read size bytes from the SSL client buffer, copying them into *buf, and return the number of bytes re...">SSLClient::read(uint8_t*, size_t)</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1040,11 +1042,11 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Read size bytes from the SSL socket buffer, copying them into *buf, and return the number of bytes read. </p>
|
||||
<p>This function checks if bytes are ready to be read by calling <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a>, and if so copies size number of bytes from the IO buffer into the buf pointer. Data read using this function will not include any SSL or socket commands, as the Client and BearSSL will capture those and process them separately.</p>
|
||||
<p>If you find that you are having a lot of timeout errors, <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class Check out README.md for more info.">SSLClient</a> may be experiencing a buffer overflow. Checkout <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> for more information.</p>
|
||||
<p>Read size bytes from the SSL client buffer, copying them into *buf, and return the number of bytes read. </p>
|
||||
<p>This function checks if bytes are ready to be read by calling <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes available to read from the data that has been received and decrypted.">SSLClient::available</a>, and if so copies size number of bytes from the IO buffer into the buf pointer. Data read using this function will not include any SSL or socket commands, as the Client and BearSSL will capture those and process them separately.</p>
|
||||
<p>If you find that you are having a lot of timeout errors, <a class="el" href="class_s_s_l_client.html" title="The main SSLClient class. Check out README.md for more info.">SSLClient</a> may be experiencing a buffer overflow. Checkout <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> for more information.</p>
|
||||
<p>The implementation for this function can be found in <a class="el" href="class_s_s_l_client_impl.html#a231b7b1bb2182cda1ed6e9d5ebf66afe">SSLClientImpl::read_impl(uint8_t*, size_t)</a></p>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a> must be >0</dd></dl>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes available to read from the data that has been received and decrypted.">SSLClient::available</a> must be >0</dd></dl>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">buf</td><td>The pointer to the buffer to put SSL application data into </td></tr>
|
||||
|
@ -1191,7 +1193,8 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Close the connection If the SSL session is still active, all incoming data is discarded and BearSSL will attempt to close the session gracefully (will write to the network), and then call m_client::stop. If the session is not active or an error was encountered previously, this function will simply call m_client::stop. The implementation for this function can be found in SSLClientImpl::peek. </p>
|
||||
<p>Close the connection. </p>
|
||||
<p>If the SSL session is still active, all incoming data is discarded and BearSSL will attempt to close the session gracefully (will write to the network), and then call m_client::stop. If the session is not active or an error was encountered previously, this function will simply call m_client::stop. The implementation for this function can be found in SSLClientImpl::peek. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1261,9 +1264,9 @@ template<class C , size_t SessionCache = 1> </div>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Write some bytes to the SSL connection. </p>
|
||||
<p>Assuming all preconditions are met, this function writes data to the BearSSL IO buffer, BUT does not initially send the data. Instead, you must call <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes availible to read from the SSL Socket.">SSLClient::available</a> or <a class="el" href="class_s_s_l_client.html#a51eb668f6a328a6a66298c6bc1361d41" title="Force writing the buffered bytes from SSLClient::write to the network. This function is blocking unti...">SSLClient::flush</a>, which will detect that the buffer is ready for writing, and will write the data to the network. Alternatively, if this function is requested to write a larger amount of data than SSLClientImpl::m_iobuf can handle, data will be written to the network in pages the size of SSLClientImpl::m_iobuf until all the data in buf is sent–attempting to keep all writes to the network grouped together. For information on why this is the case check out <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> .</p>
|
||||
<p>Assuming all preconditions are met, this function writes data to the BearSSL IO buffer, BUT does not initially send the data. Instead, you must call <a class="el" href="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29" title="Returns the number of bytes available to read from the data that has been received and decrypted.">SSLClient::available</a> or <a class="el" href="class_s_s_l_client.html#a51eb668f6a328a6a66298c6bc1361d41" title="Force writing the buffered bytes from SSLClient::write to the network.">SSLClient::flush</a>, which will detect that the buffer is ready for writing, and will write the data to the network. Alternatively, if this function is requested to write a larger amount of data than SSLClientImpl::m_iobuf can handle, data will be written to the network in pages the size of SSLClientImpl::m_iobuf until all the data in buf is sent–attempting to keep all writes to the network grouped together. For information on why this is the case check out <a class="el" href="_r_e_a_d_m_e_8md.html">README.md</a> .</p>
|
||||
<p>The implementation for this function can be found in <a class="el" href="class_s_s_l_client_impl.html#a807656f814f24cf6cd711e429b716c4d">SSLClientImpl::write_impl(const uint8_t*, size_t)</a></p>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd>The socket and SSL layer must be connected, meaning <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected. Use this function to determine if SSLClient is still connected and ...">SSLClient::connected</a> must be true. </dd>
|
||||
<dl class="section pre"><dt>Precondition</dt><dd>The socket and SSL layer must be connected, meaning <a class="el" href="class_s_s_l_client.html#a7318aadc0ec9775bffaaac0b1f00aaf8" title="Check if the device is connected.">SSLClient::connected</a> must be true. </dd>
|
||||
<dd>
|
||||
BearSSL must not be waiting for the recipt of user data (if it is, there is probably an error with how the protocol in implemented in your code).</dd></dl>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue