nixio.TLSContext.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <title>Reference</title>
  6. <link rel="stylesheet" href="../luadoc.css" type="text/css" />
  7. <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <div id="navigation">
  18. <h1>LuaDoc</h1>
  19. <ul>
  20. <li><a href="../index.html">Index</a></li>
  21. </ul>
  22. <!-- Module list -->
  23. <h1>Modules</h1>
  24. <ul>
  25. <li>
  26. <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
  27. </li>
  28. <li>
  29. <a href="../modules/luci.http.html">luci.http</a>
  30. </li>
  31. <li>
  32. <a href="../modules/luci.http.protocol.html">luci.http.protocol</a>
  33. </li>
  34. <li>
  35. <a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
  36. </li>
  37. <li>
  38. <a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
  39. </li>
  40. <li>
  41. <a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.mime</a>
  42. </li>
  43. <li>
  44. <a href="../modules/luci.i18n.html">luci.i18n</a>
  45. </li>
  46. <li>
  47. <a href="../modules/luci.ip.html">luci.ip</a>
  48. </li>
  49. <li>
  50. <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
  51. </li>
  52. <li>
  53. <a href="../modules/luci.json.html">luci.json</a>
  54. </li>
  55. <li>
  56. <a href="../modules/luci.jsonc.html">luci.jsonc</a>
  57. </li>
  58. <li>
  59. <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
  60. </li>
  61. <li>
  62. <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
  63. </li>
  64. <li>
  65. <a href="../modules/luci.model.uci.html">luci.model.uci</a>
  66. </li>
  67. <li>
  68. <a href="../modules/luci.rpcc.html">luci.rpcc</a>
  69. </li>
  70. <li>
  71. <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
  72. </li>
  73. <li>
  74. <a href="../modules/luci.sys.html">luci.sys</a>
  75. </li>
  76. <li>
  77. <a href="../modules/luci.sys.init.html">luci.sys.init</a>
  78. </li>
  79. <li>
  80. <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
  81. </li>
  82. <li>
  83. <a href="../modules/luci.sys.net.html">luci.sys.net</a>
  84. </li>
  85. <li>
  86. <a href="../modules/luci.sys.process.html">luci.sys.process</a>
  87. </li>
  88. <li>
  89. <a href="../modules/luci.sys.user.html">luci.sys.user</a>
  90. </li>
  91. <li>
  92. <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
  93. </li>
  94. <li>
  95. <a href="../modules/luci.util.html">luci.util</a>
  96. </li>
  97. <li>
  98. <a href="../modules/nixio.html">nixio</a>
  99. </li>
  100. <li>
  101. <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
  102. </li>
  103. <li>
  104. <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
  105. </li>
  106. <li>
  107. <a href="../modules/nixio.File.html">nixio.File</a>
  108. </li>
  109. <li>
  110. <a href="../modules/nixio.README.html">nixio.README</a>
  111. </li>
  112. <li>
  113. <a href="../modules/nixio.Socket.html">nixio.Socket</a>
  114. </li>
  115. <li><strong>nixio.TLSContext</strong></li>
  116. <li>
  117. <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
  118. </li>
  119. <li>
  120. <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
  121. </li>
  122. <li>
  123. <a href="../modules/nixio.bin.html">nixio.bin</a>
  124. </li>
  125. <li>
  126. <a href="../modules/nixio.bit.html">nixio.bit</a>
  127. </li>
  128. <li>
  129. <a href="../modules/nixio.crypto.html">nixio.crypto</a>
  130. </li>
  131. <li>
  132. <a href="../modules/nixio.fs.html">nixio.fs</a>
  133. </li>
  134. </ul>
  135. <!-- File list -->
  136. </div><!-- id="navigation" -->
  137. <div id="content">
  138. <h1>Object Instance <code>nixio.TLSContext</code></h1>
  139. <p>
  140. Transport Layer Security Context Object.</p>
  141. <h2>Functions</h2>
  142. <table class="function_list">
  143. <tr>
  144. <td class="name" nowrap><a href="#TLSContext.create">TLSContext:create</a>&nbsp;(socket)</td>
  145. <td class="summary">
  146. Create a TLS Socket from a socket descriptor.</td>
  147. </tr>
  148. <tr>
  149. <td class="name" nowrap><a href="#TLSContext.set_cert">TLSContext:set_cert</a>&nbsp;(path)</td>
  150. <td class="summary">
  151. Assign a PEM certificate to this context.</td>
  152. </tr>
  153. <tr>
  154. <td class="name" nowrap><a href="#TLSContext.set_ciphers">TLSContext:set_ciphers</a>&nbsp;(cipherlist)</td>
  155. <td class="summary">
  156. Set the available ciphers for this context.</td>
  157. </tr>
  158. <tr>
  159. <td class="name" nowrap><a href="#TLSContext.set_key">TLSContext:set_key</a>&nbsp;(path)</td>
  160. <td class="summary">
  161. Assign a PEM private key to this context.</td>
  162. </tr>
  163. <tr>
  164. <td class="name" nowrap><a href="#TLSContext.set_verify">TLSContext:set_verify</a>&nbsp;(flag1, ...)</td>
  165. <td class="summary">
  166. Set the verification flags of this context.</td>
  167. </tr>
  168. <tr>
  169. <td class="name" nowrap><a href="#TLSContext.set_verify_depth">TLSContext:set_verify_depth</a>&nbsp;(depth)</td>
  170. <td class="summary">
  171. Set the verification depth of this context.</td>
  172. </tr>
  173. </table>
  174. <br/>
  175. <br/>
  176. <h2><a name="functions"></a>Functions</h2>
  177. <dl class="function">
  178. <dt><a name="TLSContext.create"></a><strong>TLSContext:create</strong>&nbsp;(socket)</dt>
  179. <dd>
  180. Create a TLS Socket from a socket descriptor.
  181. <h3>Parameters</h3>
  182. <ul>
  183. <li>
  184. socket: Socket Object
  185. </li>
  186. </ul>
  187. <h3>Return value:</h3>
  188. TLSSocket Object
  189. </dd>
  190. <dt><a name="TLSContext.set_cert"></a><strong>TLSContext:set_cert</strong>&nbsp;(path)</dt>
  191. <dd>
  192. Assign a PEM certificate to this context.
  193. <h3>Parameters</h3>
  194. <ul>
  195. <li>
  196. path: Certificate File path
  197. </li>
  198. </ul>
  199. <h3>Usage:</h3>
  200. This function calls SSL_CTX_use_certificate_chain_file().
  201. <h3>Return value:</h3>
  202. true
  203. </dd>
  204. <dt><a name="TLSContext.set_ciphers"></a><strong>TLSContext:set_ciphers</strong>&nbsp;(cipherlist)</dt>
  205. <dd>
  206. Set the available ciphers for this context.
  207. <h3>Parameters</h3>
  208. <ul>
  209. <li>
  210. cipherlist: String containing a list of ciphers
  211. </li>
  212. </ul>
  213. <h3>Usage:</h3>
  214. This function calls SSL_CTX_set_cipher_list().
  215. <h3>Return value:</h3>
  216. true
  217. </dd>
  218. <dt><a name="TLSContext.set_key"></a><strong>TLSContext:set_key</strong>&nbsp;(path)</dt>
  219. <dd>
  220. Assign a PEM private key to this context.
  221. <h3>Parameters</h3>
  222. <ul>
  223. <li>
  224. path: Private Key File path
  225. </li>
  226. </ul>
  227. <h3>Usage:</h3>
  228. This function calls SSL_CTX_use_PrivateKey_file().
  229. <h3>Return value:</h3>
  230. true
  231. </dd>
  232. <dt><a name="TLSContext.set_verify"></a><strong>TLSContext:set_verify</strong>&nbsp;(flag1, ...)</dt>
  233. <dd>
  234. Set the verification flags of this context.
  235. <h3>Parameters</h3>
  236. <ul>
  237. <li>
  238. flag1: First Flag ["none", "peer", "verify_fail_if_no_peer_cert",
  239. "client_once"]
  240. </li>
  241. <li>
  242. ...: More Flags [-"-]
  243. </li>
  244. </ul>
  245. <h3>Usage:</h3>
  246. This function calls SSL_CTX_set_verify().
  247. <h3>Return value:</h3>
  248. true
  249. </dd>
  250. <dt><a name="TLSContext.set_verify_depth"></a><strong>TLSContext:set_verify_depth</strong>&nbsp;(depth)</dt>
  251. <dd>
  252. Set the verification depth of this context.
  253. <h3>Parameters</h3>
  254. <ul>
  255. <li>
  256. depth: Depth
  257. </li>
  258. </ul>
  259. <h3>Usage:</h3>
  260. This function calls SSL_CTX_set_verify_depth().
  261. <h3>Return value:</h3>
  262. true
  263. </dd>
  264. </dl>
  265. </div> <!-- id="content" -->
  266. </div> <!-- id="main" -->
  267. <div id="about">
  268. <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
  269. </div> <!-- id="about" -->
  270. </div> <!-- id="container" -->
  271. </body>
  272. </html>