<ahref="_s_s_l_client_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/* Copyright 2019 OSU OPEnS Lab</span></div><divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment"> *</span></div><divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy of this</span></div><divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment"> * software and associated documentation files (the "Software"), to deal in the Software</span></div><divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> * without restriction, including without limitation the rights to use, copy, modify,</span></div><divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment"> * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to</span></div><divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> <spanclass="comment"> * permit persons to whom the Software is furnished to do so, subject to the following</span></div><divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment"> * conditions:</span></div><divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment"> *</span></div><divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment"> * copies or substantial portions of the Software.</span></div><divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment"> *</span></div><divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,</span></div><divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A</span></div><divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment"> * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT</span></div><divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment"> * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION</span></div><divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment"> * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE</span></div><divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment"> * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></div><divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment"> */</span></div><divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> </div><divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="preprocessor">#include <type_traits></span></div><divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="preprocessor">#include "Client.h"</span></div><divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="preprocessor">#include "<aclass="code"href="_s_s_l_client_impl_8h.html">SSLClientImpl.h</a>"</span></div><divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="preprocessor">#include "<aclass="code"href="_s_s_l_session_8h
<divclass="ttc"id="class_s_s_l_client_html_a40ec85568d0aec376219125b604dbc29"><divclass="ttname"><ahref="class_s_s_l_client.html#a40ec85568d0aec376219125b604dbc29">SSLClient::available</a></div><divclass="ttdeci">virtual int available()</div><divclass="ttdoc">Returns the number of bytes available to read from the data that has been received and decrypted.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:209</div></div>
<divclass="ttc"id="class_s_s_l_session_html"><divclass="ttname"><ahref="class_s_s_l_session.html">SSLSession</a></div><divclass="ttdoc">This class stores values which allow SSLClient to save and resume SSL sessions.</div><divclass="ttdef"><b>Definition:</b> SSLSession.h:52</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ac725067566ee411680c88575c148300b"><divclass="ttname"><ahref="class_s_s_l_client.html#ac725067566ee411680c88575c148300b">SSLClient::localPort</a></div><divclass="ttdeci">virtual uint16_t localPort()</div><divclass="ttdoc">Returns the local port, C::localPort exists. Else return 0.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:334</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ae2d1d17ee568ec2a37756bf6894dcd05"><divclass="ttname"><ahref="class_s_s_l_client.html#ae2d1d17ee568ec2a37756bf6894dcd05">SSLClient::remoteIP</a></div><divclass="ttdeci">virtual IPAddress remoteIP()</div><divclass="ttdoc">Returns the remote IP, if C::remoteIP exists. Else return INADDR_NONE.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:342</div></div>
<divclass="ttc"id="class_s_s_l_client_html_afd0d4d2c98433d60897d8828d8047d41"><divclass="ttname"><ahref="class_s_s_l_client.html#afd0d4d2c98433d60897d8828d8047d41">SSLClient::getClient</a></div><divclass="ttdeci">C & getClient()</div><divclass="ttdoc">Returns a reference to the client object stored in this class. Take care not to break it.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:359</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a227b1cbbe91bcb21153c09f97d0dd484"><divclass="ttname"><ahref="class_s_s_l_client.html#a227b1cbbe91bcb21153c09f97d0dd484">SSLClient::peek</a></div><divclass="ttdeci">virtual int peek()</div><divclass="ttdoc">View the first byte of the buffer, without removing it from the SSLClient Buffer.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:247</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ae3f27a36ff9c0cd1e2bea5e1708b6e4f"><divclass="ttname"><ahref="class_s_s_l_client.html#ae3f27a36ff9c0cd1e2bea5e1708b6e4f">SSLClient::getSession</a></div><divclass="ttdeci">virtual SSLSession & getSession(const char *host, const IPAddress &addr)</div><divclass="ttdoc">Gets a session reference corresponding to a host and IP, or a reference to a empty session if none ex...</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:300</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a3a48b190985cdea2eba79ef0bdc80461"><divclass="ttname"><ahref="class_s_s_l_client.html#a3a48b190985cdea2eba79ef0bdc80461">SSLClient::write</a></div><divclass="ttdeci">virtual size_t write(const uint8_t *buf, size_t size)</div><divclass="ttdoc">Write some bytes to the SSL connection.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:189</div></div>
<divclass="ttc"id="class_s_s_l_client_html"><divclass="ttname"><ahref="class_s_s_l_client.html">SSLClient</a></div><divclass="ttdoc">The main SSLClient class. Check out README.md for more info.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:35</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ae9a7509bc8a18f67e286547c19deb3c0"><divclass="ttname"><ahref="class_s_s_l_client.html#ae9a7509bc8a18f67e286547c19deb3c0">SSLClient::SSLClient</a></div><divclass="ttdeci">SSLClient(const C &client, const br_x509_trust_anchor *trust_anchors, const size_t trust_anchors_num, const int analog_pin, const DebugLevel debug=SSL_WARN)</div><divclass="ttdoc">Initialize SSLClient with all of the prerequisites needed.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:71</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a36bb344866e4cbcba3bbfcf4d33e5187"><divclass="ttname"><ahref="class_s_s_l_client.html#a36bb344866e4cbcba3bbfcf4d33e5187">SSLClient::getSessionCount</a></div><divclass="ttdeci">virtual size_t getSessionCount() const</div><divclass="ttdoc">Get the maximum number of SSL sessions that can be stored at once.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:317</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ac70b900ff798f9fd33f6367fcc9fad77"><divclass="ttname"><ahref="class_s_s_l_client.html#ac70b900ff798f9fd33f6367fcc9fad77">SSLClient::read</a></div><divclass="ttdeci">virtual int read()</div><divclass="ttdoc">Read a single byte, or -1 if none is available.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:215</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a51eb668f6a328a6a66298c6bc1361d41"><divclass="ttname"><ahref="class_s_s_l_client.html#a51eb668f6a328a6a66298c6bc1361d41">SSLClient::flush</a></div><divclass="ttdeci">virtual void flush()</div><divclass="ttdoc">Force writing the buffered bytes from SSLClient::write to the network.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:256</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a20742b36588c45435139a4f47fe0f1f6"><divclass="ttname"><ahref="class_s_s_l_client.html#a20742b36588c45435139a4f47fe0f1f6">SSLClient::get_arduino_client</a></div><divclass="ttdeci">virtual const Client & get_arduino_client() const</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:364</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a5814c11e96848c2bcea78210f099aad5"><divclass="ttname"><ahref="class_s_s_l_client.html#a5814c11e96848c2bcea78210f099aad5">SSLClient::connect</a></div><divclass="ttdeci">virtual int connect(const char *host, uint16_t port)</div><divclass="ttdoc">Connect over SSL to a host specified by a hostname.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:162</div></div>
<divclass="ttc"id="class_s_s_l_client_html_aaa52b481eb1d36a0ae1d208daa2fec51"><divclass="ttname"><ahref="class_s_s_l_client.html#aaa52b481eb1d36a0ae1d208daa2fec51">SSLClient::get_session_array</a></div><divclass="ttdeci">virtual SSLSession * get_session_array()</div><divclass="ttdoc">Returns an instance of the session array that is on the stack.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:366</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a518f4ed733814f2f4a8c7f838555eb35"><divclass="ttname"><ahref="class_s_s_l_client.html#a518f4ed733814f2f4a8c7f838555eb35">SSLClient::operator!=</a></div><divclass="ttdeci">virtual bool operator!=(const C &rhs)</div><divclass="ttdoc">Returns whether or not two SSLClient objects do not have the same underlying client object.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:332</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a0000d7f1e8656cf4a506a98133391fe0"><divclass="ttname"><ahref="class_s_s_l_client.html#a0000d7f1e8656cf4a506a98133391fe0">SSLClient::removeSession</a></div><divclass="ttdeci">virtual void removeSession(const char *host, const IPAddress &addr)</div><divclass="ttdoc">Clear the session corresponding to a host and IP.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:310</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ae6540b9a02f1392bf2ac48421189f70e"><divclass="ttname"><ahref="class_s_s_l_client.html#ae6540b9a02f1392bf2ac48421189f70e">SSLClient::connect</a></div><divclass="ttdeci">virtual int connect(IPAddress ip, uint16_t port)</div><divclass="ttdoc">Connect over SSL to a host specified by an IP address.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:124</div></div>
<divclass="ttc"id="class_s_s_l_client_impl_html"><divclass="ttname"><ahref="class_s_s_l_client_impl.html">SSLClientImpl</a></div><divclass="ttdoc">Implementation code to be inherited by SSLClient.</div><divclass="ttdef"><b>Definition:</b> SSLClientImpl.h:71</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ae31dd88a1af8ec3794fb48f26a3dd4bf"><divclass="ttname"><ahref="class_s_s_l_client.html#ae31dd88a1af8ec3794fb48f26a3dd4bf">SSLClient::read</a></div><divclass="ttdeci">virtual int read(uint8_t *buf, size_t size)</div><divclass="ttdoc">Read size bytes from the SSL client buffer, copying them into *buf, and return the number of bytes re...</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:237</div></div>
<divclass="ttc"id="class_s_s_l_client_html_a26f9418e33d4ca459f78de98d3af43bb"><divclass="ttname"><ahref="class_s_s_l_client.html#a26f9418e33d4ca459f78de98d3af43bb">SSLClient::operator==</a></div><divclass="ttdeci">virtual bool operator==(const C &rhs)</div><divclass="ttdoc">Returns whether or not two SSLClient objects have the same underlying client object.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:330</div></div>
<divclass="ttc"id="class_s_s_l_client_html_ab3ebfbca41a56bfa11e34aac2c2e0106"><divclass="ttname"><ahref="class_s_s_l_client.html#ab3ebfbca41a56bfa11e34aac2c2e0106">SSLClient::get_arduino_client</a></div><divclass="ttdeci">virtual Client & get_arduino_client()</div><divclass="ttdoc">Returns an instance of m_client that is polymorphic and can be used by SSLClientImpl.</div><divclass="ttdef"><b>Definition:</b> SSLClient.h:363</div></div>
<divclass="ttc"id="_s_s_l_client_impl_8h_html_ab658e6d84759440dbf3c890446075395"><divclass="ttname"><ahref="_s_s_l_client_impl_8h.html#ab658e6d84759440dbf3c890446075395">DebugLevel</a></div><divclass="ttdeci">DebugLevel</div><divclass="ttdoc">Level of verbosity used in logging for SSLClient.</div><divclass="ttdef"><b>Definition:</b> SSLClientImpl.h:59</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->