Merge pull request #1708 from guidosarducci/lede-17.01-add-luci-isolate-mac80211
[project/luci.git] / libs / luci-lib-nixio / docsrc / nixio.TLSContext.lua
1 --- Transport Layer Security Context Object.
2 -- @cstyle      instance
3 module "nixio.TLSContext"
4
5 --- Create a TLS Socket from a socket descriptor.
6 -- @class function
7 -- @name TLSContext.create
8 -- @param socket Socket Object
9 -- @return TLSSocket Object
10
11 --- Assign a PEM certificate to this context.
12 -- @class function
13 -- @name TLSContext.set_cert
14 -- @usage This function calls SSL_CTX_use_certificate_chain_file().
15 -- @param path  Certificate File path
16 -- @return true
17
18 --- Assign a PEM private key to this context.
19 -- @class function
20 -- @name TLSContext.set_key
21 -- @usage This function calls SSL_CTX_use_PrivateKey_file().
22 -- @param path  Private Key File path
23 -- @return true
24
25 --- Set the available ciphers for this context.
26 -- @class function
27 -- @name TLSContext.set_ciphers
28 -- @usage This function calls SSL_CTX_set_cipher_list().
29 -- @param cipherlist    String containing a list of ciphers
30 -- @return true
31
32 --- Set the verification depth of this context.
33 -- @class function
34 -- @name TLSContext.set_verify_depth
35 -- @usage This function calls SSL_CTX_set_verify_depth().
36 -- @param depth Depth
37 -- @return true
38
39 --- Set the verification flags of this context.
40 -- @class function
41 -- @name TLSContext.set_verify
42 -- @usage This function calls SSL_CTX_set_verify().
43 -- @param flag1 First Flag      ["none", "peer", "verify_fail_if_no_peer_cert", 
44 -- "client_once"]
45 -- @param ...   More Flags      [-"-]
46 -- @return true