Object Instance nixio.TLSContext

Transport Layer Security Context Object.

Functions

TLSContext:create (socket) Create a TLS Socket from a socket descriptor.
TLSContext:set_cert (path) Assign a PEM certificate to this context.
TLSContext:set_ciphers (cipherlist) Set the available ciphers for this context.
TLSContext:set_key (path) Assign a PEM private key to this context.
TLSContext:set_verify (flag1, ...) Set the verification flags of this context.
TLSContext:set_verify_depth (depth) Set the verification depth of this context.


Functions

TLSContext:create (socket)
Create a TLS Socket from a socket descriptor.

Parameters

  • socket: Socket Object

Return value:

TLSSocket Object
TLSContext:set_cert (path)
Assign a PEM certificate to this context.

Parameters

  • path: Certificate File path

Usage:

This function calls SSL_CTX_use_certificate_chain_file().

Return value:

true
TLSContext:set_ciphers (cipherlist)
Set the available ciphers for this context.

Parameters

  • cipherlist: String containing a list of ciphers

Usage:

This function calls SSL_CTX_set_cipher_list().

Return value:

true
TLSContext:set_key (path)
Assign a PEM private key to this context.

Parameters

  • path: Private Key File path

Usage:

This function calls SSL_CTX_use_PrivateKey_file().

Return value:

true
TLSContext:set_verify (flag1, ...)
Set the verification flags of this context.

Parameters

  • flag1: First Flag ["none", "peer", "verify_fail_if_no_peer_cert", "client_once"]
  • ...: More Flags [-"-]

Usage:

This function calls SSL_CTX_set_verify().

Return value:

true
TLSContext:set_verify_depth (depth)
Set the verification depth of this context.

Parameters

  • depth: Depth

Usage:

This function calls SSL_CTX_set_verify_depth().

Return value:

true

Valid XHTML 1.0!