Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
ENGINE_ctrl, ENGINE_cmd_is_executable, ENGINE_ctrl_cmd, ENGINE_ctrl_cmd_string, ENGINE_set_ctrl_function, ENGINE_get_ctrl_function, ENGINE_set_cmd_defns, ENGINE_get_cmd_defns — control commands for ENGINE objectsSYNOPSIS
#include <openssl/engine.h>ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
ENGINE_cmd_is_executable(ENGINE *e, int cmd);
ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, long i, void *p, void (*f)(void), int cmd_optional);
ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg, int cmd_optional);
(*ENGINE_CTRL_FUNC_PTR)(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);
ENGINE_get_ctrl_function(const ENGINE *e);
ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
ENGINE_get_cmd_defns(const ENGINE *e);
DESCRIPTION
ENGINE_ctrl() calls the built-in or user-defined cmd for the engine e, passing the arguments i and p.- ENGINE_CTRL_GET_CMD_FLAGS
- Return the cmd_flags of the user-defined command with the number i, or a number less than or equal to 0 if an error occurs or the command number does not exist. A return value of 0 indicates failure if e is NULL or has a reference count of 0, or success if e is valid.
- ENGINE_CTRL_GET_CMD_FROM_NAME
- Return the positive command number of the user-defined command with the name p, or a number less than or equal to 0 if an error occurs or no matching name is found.
- ENGINE_CTRL_GET_DESC_FROM_CMD
- Copy the description of the user-defined command with the number i into the buffer p and NUL-terminate it. It is the responsibility of the caller to make sure that the buffer p is large enough, either by calling ENGINE_CTRL_GET_DESC_LEN_FROM_CMD first or using knowledge about the array passed to ENGINE_set_cmd_defns(). The return value is the number of bytes written including the terminating NUL byte, or a number less than or equal to 0 if an error occurs.
- ENGINE_CTRL_GET_DESC_LEN_FROM_CMD
- Return the length in bytes excluding the terminating NUL byte of the description of the user-defined command with the number i, or a number less than or equal to 0 if an error occurs. A return value of 0 indicates failure if e is NULL or has a reference count of 0, or success if e is valid.
- ENGINE_CTRL_GET_FIRST_CMD_TYPE
- Return the positive command number of the first user-defined command installed with ENGINE_set_cmd_defns() or a number less than or equal to 0 if an error occurs or no user-defined command has been installed.
- ENGINE_CTRL_GET_NAME_FROM_CMD
- Copy the name of the user-defined command with the number i into the buffer p and NUL-terminate it. It is the responsibility of the caller to make sure that the buffer p is large enough, either by calling ENGINE_CTRL_GET_NAME_LEN_FROM_CMD first or using knowledge about the array passed to ENGINE_set_cmd_defns(). The return value is the number of bytes written including the terminating NUL byte, or a number less than or equal to 0 if an error occurs.
- ENGINE_CTRL_GET_NAME_LEN_FROM_CMD
- Return the length in bytes excluding the terminating NULL byte of the name of the user-defined command with the number i, or a number less than or equal to 0 if an error occurs. A return value of 0 indicates failure if e is NULL or has a reference count of 0, or success if e is valid.
- ENGINE_CTRL_GET_NEXT_CMD_TYPE
- Return the positive command number of the next user-defined command after the user-defined command with the number i, or a number less than or equal to 0 if an error occurs or if i is the last user-defined command. Together with ENGINE_CTRL_GET_FIRST_CMD_TYPE, this can be used to iterate the user-defined commands installed with ENGINE_set_cmd_defns().
- ENGINE_CTRL_HAS_CTRL_FUNCTION
- Return 1 if e has its own ctrl_f installed with ENGINE_set_ctrl_function() or 0 otherwise.
- unsigned int cmd_num
- A positive, unique, monotonically increasing command number. Avoid using numbers below ENGINE_CMD_BASE.
- const char *cmd_name
- The unique name of the command.
- const char *cmd_desc
- A short description of the command.
- unsigned int cmd_flags
-
The bitwise OR of zero or more of the following flags:
- ENGINE_CMD_FLAG_NUMERIC
- The command uses i.
- ENGINE_CMD_FLAG_STRING
- The command uses p.
- ENGINE_CMD_FLAG_NO_INPUT
- The command neither uses i nor p.
- ENGINE_CMD_FLAG_INTERNAL
- This flag has no effect and is only provided for compatibility.