Fortinet white logo
Fortinet white logo

Script Reference Guide

SSL commands

SSL commands

SSL commands contain functions for obtaining SSL related information, such as obtaining certificates and SNI:

  • SSL:cipher() — Returns the cipher in the handshake.

  • SSL:version() — Returns the SSL version in the handshake.

  • SSL:alg_keysize() — Returns the SSL encryption key size in the handshake.

  • SSL:client_cert() — Returns the status of client-certificate-verify, whether or not it is enabled.

  • SSL:sni() — Returns the SNI or false (if no SNI).

  • SSL:npn() — Returns the next protocol negotiation string or false (if no NPN).

  • SSL:alpn() — Allows you to get the SSL ALPN extension.

  • SSL:session(t) — Allows you to get SSL session ID, reuse the session, or remove it from the cache.

  • SSL:cert(t) — Allows you to get the certificate information between local or remote.

  • SSL:peer_cert(str) — Returns the peer certificate in different formats.

  • SSL:disable() — Disables SSL processing on either the client or server side when non-SSL traffic is expected or desired.

  • SSL:cert_request() — Requests the client certificate and verifies it. This command returns Boolean true if successful, otherwise, returns Boolean false.

  • SSL:get_verify_depth() — Gets the client certificate verify depth. This command returns the depth as an integer.

  • SSL:renegotiate() — Requests the client side SSL renegotiation. This command returns Boolean true if successful, otherwise, returns Boolean false. Note that if renegotiation fails, this request will fail; we recommend only using this command if renegotiation is necessary.

  • SSL:set_verify_depth() — Sets the client certificate verify depth. This command returns Boolean true if successful, otherwise, returns Boolean false.

  • SSL:verify_result() — Gets the certificate verify result. This command returns the result as an integer.

SSL commands

SSL commands

SSL commands contain functions for obtaining SSL related information, such as obtaining certificates and SNI:

  • SSL:cipher() — Returns the cipher in the handshake.

  • SSL:version() — Returns the SSL version in the handshake.

  • SSL:alg_keysize() — Returns the SSL encryption key size in the handshake.

  • SSL:client_cert() — Returns the status of client-certificate-verify, whether or not it is enabled.

  • SSL:sni() — Returns the SNI or false (if no SNI).

  • SSL:npn() — Returns the next protocol negotiation string or false (if no NPN).

  • SSL:alpn() — Allows you to get the SSL ALPN extension.

  • SSL:session(t) — Allows you to get SSL session ID, reuse the session, or remove it from the cache.

  • SSL:cert(t) — Allows you to get the certificate information between local or remote.

  • SSL:peer_cert(str) — Returns the peer certificate in different formats.

  • SSL:disable() — Disables SSL processing on either the client or server side when non-SSL traffic is expected or desired.

  • SSL:cert_request() — Requests the client certificate and verifies it. This command returns Boolean true if successful, otherwise, returns Boolean false.

  • SSL:get_verify_depth() — Gets the client certificate verify depth. This command returns the depth as an integer.

  • SSL:renegotiate() — Requests the client side SSL renegotiation. This command returns Boolean true if successful, otherwise, returns Boolean false. Note that if renegotiation fails, this request will fail; we recommend only using this command if renegotiation is necessary.

  • SSL:set_verify_depth() — Sets the client certificate verify depth. This command returns Boolean true if successful, otherwise, returns Boolean false.

  • SSL:verify_result() — Gets the certificate verify result. This command returns the result as an integer.