1
0

nixio.TLSContext.lua 1.4 KB

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