From: tb Date: Sun, 19 Nov 2023 10:36:14 +0000 (+0000) Subject: Remove remaining ENGINE manuals X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=311b40ca7241edf0e82784f16b8d6551341869a0;p=openbsd Remove remaining ENGINE manuals They document functionality that no longer exists. --- diff --git a/lib/libcrypto/man/ENGINE_add.3 b/lib/libcrypto/man/ENGINE_add.3 deleted file mode 100644 index 4ae878b4f59..00000000000 --- a/lib/libcrypto/man/ENGINE_add.3 +++ /dev/null @@ -1,243 +0,0 @@ -.\" $OpenBSD: ENGINE_add.3,v 1.3 2018/04/18 03:39:22 schwarze Exp $ -.\" content checked up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: April 18 2018 $ -.Dt ENGINE_ADD 3 -.Os -.Sh NAME -.Nm ENGINE_add , -.Nm ENGINE_set_id , -.Nm ENGINE_get_id , -.Nm ENGINE_set_name , -.Nm ENGINE_get_name , -.Nm ENGINE_remove , -.Nm ENGINE_cleanup , -.Nm ENGINE_get_first , -.Nm ENGINE_get_last , -.Nm ENGINE_get_next , -.Nm ENGINE_get_prev , -.Nm ENGINE_by_id -.Nd maintain a global list of ENGINE objects -.Sh SYNOPSIS -.In openssl/engine.h -.Ft int -.Fo ENGINE_add -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_id -.Fa "ENGINE *e" -.Fa "const char *id" -.Fc -.Ft const char * -.Fo ENGINE_get_id -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_name -.Fa "ENGINE *e" -.Fa "const char *name" -.Fc -.Ft const char * -.Fo ENGINE_get_name -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_remove -.Fa "ENGINE *e" -.Fc -.Ft void -.Fn ENGINE_cleanup void -.Ft ENGINE * -.Fn ENGINE_get_first void -.Ft ENGINE * -.Fn ENGINE_get_last void -.Ft ENGINE * -.Fo ENGINE_get_next -.Fa "ENGINE *e" -.Fc -.Ft ENGINE * -.Fo ENGINE_get_prev -.Fa "ENGINE *e" -.Fc -.Ft ENGINE * -.Fo ENGINE_by_id -.Fa "const char *id" -.Fc -.Sh DESCRIPTION -The crypto library maintains a global list of -.Vt ENGINE -objects. -.Pp -.Fn ENGINE_add -appends -.Fa e -to the end of the list -and increments its structural reference count by 1. -A unique identifier and a name of -.Fa e -have to be set with -.Fn ENGINE_set_id -and -.Fn ENGINE_set_name -before calling this function. -.Fn ENGINE_add -fails if the list already contains an -.Vt ENGINE -with the same identifier. -.Pp -.Fn ENGINE_remove -removes -.Fa e -from the list. -If successful, it calls -.Xr ENGINE_free 3 -on -.Fa e . -.Pp -.Fn ENGINE_cleanup -calls -.Xr ENGINE_finish 3 -on all -.Vt ENGINE -objects that were selected as default engines, for example using the -functions documented in the -.Xr ENGINE_set_default 3 -and -.Xr ENGINE_get_default_RSA 3 -manual pages, and it calls -.Fn ENGINE_remove -on all -.Vt ENGINE -objects that were added to the global list with -.Fn ENGINE_add . -Calling this function is required at the end of each program using -.Fn ENGINE_add , -even if no engines are explicitly registered or used. -.Pp -.Fn ENGINE_get_first -and -.Fn ENGINE_get_last -provide access to the first and last -.Vt ENGINE -object on the list, respectively. -Unless the list is empty, they increment the structural reference -count of the retrieved object by 1. -.Pp -.Fn ENGINE_get_next -and -.Fn ENGINE_get_prev -support iteration of the list. -They always call -.Xr ENGINE_free 3 -on -.Fa e . -Unless the end of the list is reached, they increment the structural -reference count of the retrieved object by 1. -.Pp -.Fn ENGINE_by_id -searches the list for an -.Vt ENGINE -object with a matching -.Fa id . -If found, it increments the structural reference count of the -retrieved object by 1. -If -.Dv ENGINE_FLAGS_BY_ID_COPY -was set on -.Fa e -with -.Xr ENGINE_set_flags 3 , -it returns a shallow copy of the object rather than incrementing -the reference count and returning a pointer to the original. -.Sh RETURN VALUES -.Fn ENGINE_add , -.Fn ENGINE_set_id , -.Fn ENGINE_set_name , -and -.Fn ENGINE_remove -return 1 on success or 0 on error. -.Fn ENGINE_set_id -and -.Fn ENGINE_set_name -can only fail if the supplied -.Fa id -or -.Fa name -is -.Dv NULL . -.Pp -.Fn ENGINE_get_id -and -.Fn ENGINE_get_name -return a pointer to an internal string -representing the identifier and the name of -.Fa e , -respectively. -.Pp -.Fn ENGINE_get_first -and -.Fn ENGINE_get_last -return an -.Vt ENGINE -object or -.Dv NULL -if the list is empty. -.Pp -.Fn ENGINE_get_next -and -.Fn ENGINE_get_prev -return an -.Vt ENGINE -object or -.Dv NULL -when the end of the list is reached. -.Pp -.Fn ENGINE_by_id -returns an -.Vt ENGINE -object or -.Dv NULL -if no matching object is found. -.Sh SEE ALSO -.Xr ENGINE_get_default_RSA 3 , -.Xr ENGINE_init 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_all_RSA 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_default 3 , -.Xr ENGINE_set_flags 3 , -.Xr ENGINE_unregister_RSA 3 -.Sh HISTORY -.Fn ENGINE_add , -.Fn ENGINE_set_id , -.Fn ENGINE_get_id , -.Fn ENGINE_set_name , -.Fn ENGINE_get_name , -.Fn ENGINE_remove , -.Fn ENGINE_get_first , -.Fn ENGINE_get_last , -.Fn ENGINE_get_next , -.Fn ENGINE_get_prev , -and -.Fn ENGINE_by_id -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 2.9 . -.Pp -.Fn ENGINE_cleanup -first appeared in OpenSSL 0.9.7 and has been available since -.Ox 3.2 . diff --git a/lib/libcrypto/man/ENGINE_ctrl.3 b/lib/libcrypto/man/ENGINE_ctrl.3 deleted file mode 100644 index b4965a5a038..00000000000 --- a/lib/libcrypto/man/ENGINE_ctrl.3 +++ /dev/null @@ -1,470 +0,0 @@ -.\" $OpenBSD: ENGINE_ctrl.3,v 1.5 2022/01/15 23:38:50 jsg Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: January 15 2022 $ -.Dt ENGINE_CTRL 3 -.Os -.Sh NAME -.Nm ENGINE_ctrl , -.Nm ENGINE_cmd_is_executable , -.Nm ENGINE_ctrl_cmd , -.Nm ENGINE_ctrl_cmd_string , -.Nm ENGINE_set_ctrl_function , -.Nm ENGINE_get_ctrl_function , -.Nm ENGINE_set_cmd_defns , -.Nm ENGINE_get_cmd_defns -.Nd control commands for ENGINE objects -.Sh SYNOPSIS -.In openssl/engine.h -.Ft int -.Fo ENGINE_ctrl -.Fa "ENGINE *e" -.Fa "int cmd" -.Fa "long i" -.Fa "void *p" -.Fa "void (*f)(void)" -.Fc -.Ft int -.Fo ENGINE_cmd_is_executable -.Fa "ENGINE *e" -.Fa "int cmd" -.Fc -.Ft int -.Fo ENGINE_ctrl_cmd -.Fa "ENGINE *e" -.Fa "const char *cmd_name" -.Fa "long i" -.Fa "void *p" -.Fa "void (*f)(void)" -.Fa "int cmd_optional" -.Fc -.Ft int -.Fo ENGINE_ctrl_cmd_string -.Fa "ENGINE *e" -.Fa "const char *cmd_name" -.Fa "const char *arg" -.Fa "int cmd_optional" -.Fc -.Ft typedef int -.Fo (*ENGINE_CTRL_FUNC_PTR) -.Fa "ENGINE *e" -.Fa "int cmd" -.Fa "long i" -.Fa "void *p" -.Fa "void (*f)(void)" -.Fc -.Ft int -.Fo ENGINE_set_ctrl_function -.Fa "ENGINE *e" -.Fa "ENGINE_CTRL_FUNC_PTR ctrl_f" -.Fc -.Ft ENGINE_CTRL_FUNC_PTR -.Fo ENGINE_get_ctrl_function -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_cmd_defns -.Fa "ENGINE *e" -.Fa "const ENGINE_CMD_DEFN *defns" -.Fc -.Ft const ENGINE_CMD_DEFN * -.Fo ENGINE_get_cmd_defns -.Fa "const ENGINE *e" -.Fc -.Sh DESCRIPTION -.Fn ENGINE_ctrl -calls the built-in or user-defined -.Fa cmd -for the engine -.Fa e , -passing the arguments -.Fa i -and -.Fa p . -.Pp -User-defined commands can be used before -.Xr ENGINE_init 3 -to provide data required for initialization -or at any time to modify the behaviour of an engine. -.Pp -Most built-in commands operate on user-defined commands installed with -.Fn ENGINE_set_cmd_defns , -either using the -.Fa p -argument to indicate the user-defined command with the command name -.Fa cmd_name -or using the -.Fa i -argument to indicate the user-defined command with the command number -.Fa cmd_num . -The -.Fa cmd -arguments to call the built-in commands are as follows: -.Bl -tag -width Ds -.It Dv ENGINE_CTRL_GET_CMD_FLAGS -Return the -.Fa cmd_flags -of the user-defined command with the number -.Fa 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 -.Fa e -is -.Dv NULL -or has a reference count of 0, or success if -.Fa e -is valid. -.It Dv ENGINE_CTRL_GET_CMD_FROM_NAME -Return the positive command number -of the user-defined command with the name -.Fa p , -or a number less than or equal to 0 if an error occurs or no -matching name is found. -.It Dv ENGINE_CTRL_GET_DESC_FROM_CMD -Copy the description of the user-defined command with the number -.Fa i -into the buffer -.Fa p -and NUL-terminate it. -It is the responsibility of the caller to make sure that the buffer -.Fa p -is large enough, either by calling -.Dv ENGINE_CTRL_GET_DESC_LEN_FROM_CMD -first or using knowledge about the array passed to -.Fn ENGINE_set_cmd_defns . -The return value is the number of bytes written -.Em including -the terminating NUL byte, or a number less than or equal to 0 -if an error occurs. -.It Dv ENGINE_CTRL_GET_DESC_LEN_FROM_CMD -Return the length in bytes -.Em excluding -the terminating NUL byte -of the description of the user-defined command with the number -.Fa i , -or a number less than or equal to 0 if an error occurs. -A return value of 0 indicates failure if -.Fa e -is -.Dv NULL -or has a reference count of 0, or success if -.Fa e -is valid. -.It Dv ENGINE_CTRL_GET_FIRST_CMD_TYPE -Return the positive command number -of the first user-defined command installed with -.Fn 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. -.It Dv ENGINE_CTRL_GET_NAME_FROM_CMD -Copy the name of the user-defined command with the number -.Fa i -into the buffer -.Fa p -and NUL-terminate it. -It is the responsibility of the caller to make sure that the buffer -.Fa p -is large enough, either by calling -.Dv ENGINE_CTRL_GET_NAME_LEN_FROM_CMD -first or using knowledge about the array passed to -.Fn ENGINE_set_cmd_defns . -The return value is the number of bytes written -.Em including -the terminating NUL byte, or a number less than or equal to 0 -if an error occurs. -.It Dv ENGINE_CTRL_GET_NAME_LEN_FROM_CMD -Return the length in bytes -.Em excluding -the terminating NULL byte -of the name of the user-defined command with the number -.Fa i , -or a number less than or equal to 0 if an error occurs. -A return value of 0 indicates failure if -.Fa e -is -.Dv NULL -or has a reference count of 0, or success if -.Fa e -is valid. -.It Dv 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 -.Fa i , -or a number less than or equal to 0 if an error occurs or if -.Fa i -is the last user-defined command. -Together with -.Dv ENGINE_CTRL_GET_FIRST_CMD_TYPE , -this can be used to iterate the user-defined commands installed with -.Fn ENGINE_set_cmd_defns . -.It Dv ENGINE_CTRL_HAS_CTRL_FUNCTION -Return 1 if -.Fa e -has its own -.Fa ctrl_f -installed with -.Fn ENGINE_set_ctrl_function -or 0 otherwise. -.El -.Pp -.Fn ENGINE_ctrl_cmd -translates the -.Fa cmd_name -of a user-defined command to a -.Fa cmd -number and calls -.Fn ENGINE_ctrl -on it. -If -.Fa cmd_optional -is non-zero, lack of a -.Fa ctrl_f -in -.Fa e -and translation failure with -.Dv ENGINE_CTRL_GET_CMD_FROM_NAME -are considered success, and the command has no effect. -Otherwise, these problems cause -.Fn ENGINE_ctrl_cmd -to fail. -.Pp -Neither -.Fn ENGINE_ctrl -nor -.Fn ENGINE_ctrl_cmd -ever call the -.Fa f -callback, but merely pass it on as an argument to the engine-specific -.Fa ctrl_f -control function. -It is up to -.Fa ctrl_f -how to use it, or alternatively to ignore it as well. -.Pp -.Fn ENGINE_ctrl_cmd_string -translates the -.Fa cmd_name -of a user-defined command to a -.Fa cmd -number. -If that command has the -.Dv ENGINE_CMD_FLAG_NO_INPUT -flag set, -.Fa arg -must be -.Dv NULL -and -.Fn ENGINE_ctrl -is called with -.Fa i -set to 0 and -.Fa p -set to -.Dv NULL . -Otherwise, -.Fa arg -must not be -.Dv NULL . -If the command accepts string input, -.Fa i -is set to 0 and -.Fa arg -is passed as the -.Fa p -argument to -.Fn ENGINE_ctrl . -Otherwise, -.Fa arg -is converted with -.Xr strtol 3 -and passed as the -.Fa i -argument to -.Fn ENGINE_ctrl , -setting -.Fa p -to -.Dv NULL . -.Pp -.Fn ENGINE_set_ctrl_function -installs -.Fa ctrl_f -as the engine-specific control function for -.Fa e . -Future calls to -.Fn ENGINE_ctrl -will call that function, passing on their arguments unchanged, if the -.Fa cmd -is not built-in to the library or if the -.Dv ENGINE_FLAGS_MANUAL_CMD_CTRL -flag is set in -.Fa e . -Let the -.Fa ctrl_f -return positive values on success or negative values on failure. -Avoid return values of 0 because they cause dangerous ambiguity. -In particular, -.Fn ENGINE_ctrl_cmd -and -.Fn ENGINE_ctrl_cmd_string -cannot be used with user-defined commands -that may return 0 on success. -.Pp -.Fn ENGINE_set_cmd_defns -install an array of command definitions in -.Fa e . -.Pp -The structure -.Vt ENGINE_CMD_DEFN -has the following fields: -.Bl -tag -width Ds -.It Fa "unsigned int cmd_num" -A positive, unique, monotonically increasing command number. -Avoid using numbers below -.Dv ENGINE_CMD_BASE . -.It Fa "const char *cmd_name" -The unique name of the command. -.It Fa "const char *cmd_desc" -A short description of the command. -.It Fa "unsigned int cmd_flags" -The bitwise OR of zero or more of the following flags: -.Bl -tag -width Ds -.It Dv ENGINE_CMD_FLAG_NUMERIC -The command uses -.Fa i . -.It Dv ENGINE_CMD_FLAG_STRING -The command uses -.Fa p . -.It Dv ENGINE_CMD_FLAG_NO_INPUT -The command neither uses -.Fa i -nor -.Fa p . -.It Dv ENGINE_CMD_FLAG_INTERNAL -This flag has no effect and is only provided for compatibility. -.El -.El -.Pp -The last element of -.Fa defns -does not specify a command, but must have a -.Fa cmd_num -of 0 and a -.Fa cmd_name -of -.Dv NULL -to indicate the end of the array. -.Sh RETURN VALUES -For -.Fn ENGINE_ctrl , -positive return values indicate success and negative return values -indicate failure. -The meaning of a zero return value depends on the particular -.Fa cmd -and may indicate both success and failure, which is pathetic. -.Pp -Regardless of the -.Fa cmd , -.Fn ENGINE_ctrl -returns 0 if -.Fa e -is -.Dv NULL -or has a reference count of 0. -This is quite unfortunate for commands like -.Dv ENGINE_CTRL_GET_CMD_FLAGS -where 0 may indicate success, so make sure -.Fa e -is valid before issuing a control command. -.Pp -For built-in commands except -.Dv ENGINE_CTRL_HAS_CTRL_FUNCTION , -.Fn ENGINE_ctrl -returns \-1 if -.Dv ENGINE_FLAGS_MANUAL_CMD_CTRL -is set but no -.Fa ctrl_f -has been installed with -.Fn ENGINE_set_ctrl_function . -.Pp -For commands that are not built in, -.Fn ENGINE_ctrl -returns 0 if no -.Fa ctrl_f -has been installed with -.Fn ENGINE_set_ctrl_function . -.Pp -.Fn ENGINE_cmd_is_executable -returns 1 if the user-defined -.Fa cmd -is executable and has at least one of the flags -.Dv ENGINE_CMD_FLAG_NUMERIC , -.Dv ENGINE_CMD_FLAG_STRING , -and -.Dv ENGINE_CMD_FLAG_NO_INPUT -set, or 0 otherwise. -.Pp -.Fn ENGINE_ctrl_cmd -and -.Fn ENGINE_ctrl_cmd_string -return 1 on success or 0 on error. -.Pp -.Fn ENGINE_set_ctrl_function -and -.Fn ENGINE_set_cmd_defns -always return 1. -.Pp -.Fn ENGINE_get_ctrl_function -returns a pointer to the function -.Fa ctrl_f -installed with -.Fn ENGINE_set_ctrl_function , -or -.Dv NULL -if none has been installed. -.Pp -.Fn ENGINE_get_cmd_defns -returns the array of command definitions installed in -.Fa e -or -.Dv NULL -if none is installed. -.Sh SEE ALSO -.Xr ENGINE_add 3 , -.Xr ENGINE_init 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_flags 3 , -.Xr ENGINE_set_RSA 3 -.Sh HISTORY -.Fn ENGINE_ctrl , -.Fn ENGINE_set_ctrl_function , -and -.Fn ENGINE_get_ctrl_function -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 2.9 . -.Pp -.Fn ENGINE_cmd_is_executable , -.Fn ENGINE_ctrl_cmd , -.Fn ENGINE_ctrl_cmd_string , -.Fn ENGINE_set_cmd_defns , -and -.Fn ENGINE_get_cmd_defns -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . diff --git a/lib/libcrypto/man/ENGINE_get_default_RSA.3 b/lib/libcrypto/man/ENGINE_get_default_RSA.3 deleted file mode 100644 index 348f13670f9..00000000000 --- a/lib/libcrypto/man/ENGINE_get_default_RSA.3 +++ /dev/null @@ -1,151 +0,0 @@ -.\" $OpenBSD: ENGINE_get_default_RSA.3,v 1.4 2023/07/21 04:35:36 tb Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: July 21 2023 $ -.Dt ENGINE_GET_DEFAULT_RSA 3 -.Os -.Sh NAME -.Nm ENGINE_get_default_RSA , -.Nm ENGINE_get_default_DSA , -.Nm ENGINE_get_default_EC , -.Nm ENGINE_get_default_DH , -.Nm ENGINE_get_default_RAND , -.Nm ENGINE_get_cipher_engine , -.Nm ENGINE_get_digest_engine , -.Nm ENGINE_set_table_flags , -.Nm ENGINE_get_table_flags -.Nd retrieve the default ENGINE for an algorithm -.Sh SYNOPSIS -.In openssl/engine.h -.Ft ENGINE * -.Fn ENGINE_get_default_RSA void -.Ft ENGINE * -.Fn ENGINE_get_default_DSA void -.Ft ENGINE * -.Fn ENGINE_get_default_EC void -.Ft ENGINE * -.Fn ENGINE_get_default_DH void -.Ft ENGINE * -.Fn ENGINE_get_default_RAND void -.Ft ENGINE * -.Fo ENGINE_get_cipher_engine -.Fa "int nid" -.Fc -.Ft ENGINE * -.Fo ENGINE_get_digest_engine -.Fa "int nid" -.Fc -.Ft void -.Fo ENGINE_set_table_flags -.Fa "unsigned int flags" -.Fc -.Ft unsigned int -.Fn ENGINE_get_table_flags void -.Sh DESCRIPTION -These functions retrieve the current default -.Vt ENGINE -implementing the respective algorithm. -.Pp -If a default engine was previously selected, -.Xr ENGINE_init 3 -is called on it again and it is used. -Otherwise, these functions inspect the engines registered -with the functions documented in -.Xr ENGINE_register_RSA 3 -in the order of the table for the respective algorithm. -If an inspected engine is already successfully initialized, -.Xr ENGINE_init 3 -is called on it again and it is used as the new default. -Otherwise, unless the global flag -.Dv ENGINE_TABLE_FLAG_NOINIT -is set, -.Xr ENGINE_init 3 -is tried on it. -If it succeeds, that engine is used as the new default. -If it fails or if -.Dv ENGINE_TABLE_FLAG_NOINIT -is set, inspection continues with the next engine. -.Pp -The global flag can be set by calling -.Fn ENGINE_set_table_flags -with an argument of -.Dv ENGINE_TABLE_FLAG_NOINIT -or cleared by calling it with an argument of 0. -By default, the flag is not set. -.Pp -While all the other functions operate on exactly one algorithm, -.Fn ENGINE_get_cipher_engine -and -.Fn ENGINE_get_digest_engine -are special in so far as they can handle multiple algorithms, -identified by the given -.Fa nid . -The default engine is remembered separately for each algorithm. -.Pp -Application programs rarely need to call these functions because -they are called automatically when needed, in particular from -.Xr RSA_new 3 , -.Xr DSA_new 3 , -.Xr EC_KEY_new 3 , -.Xr DH_new 3 , -.Xr EVP_CipherInit_ex 3 , -and -.Xr EVP_DigestInit_ex 3 . -.Sh RETURN VALUES -These functions return a functional reference to an -.Vt ENGINE -object or -.Dv NULL -on failure, in particular when no engine implementing the algorithm -is available, when -.Xr ENGINE_init 3 -fails for all implementations, -or when insufficient memory is available. -Even when these functions fail, the application may still be able -to use the algorithm in question because the built-in implementation -is used in that case, if one is available. -.Pp -.Fn ENGINE_get_table_flags -returns -.Dv ENGINE_TABLE_FLAG_NOINIT -if the global flag is set or 0 otherwise. -.Sh SEE ALSO -.Xr ENGINE_init 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_default 3 -.Sh HISTORY -.Fn ENGINE_get_default_RSA , -.Fn ENGINE_get_default_DSA , -.Fn ENGINE_get_default_DH , -and -.Fn ENGINE_get_default_RAND -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 2.9 . -.Pp -.Fn ENGINE_get_cipher_engine , -.Fn ENGINE_get_digest_engine , -.Fn ENGINE_set_table_flags , -and -.Fn ENGINE_get_table_flags -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . -.Pp -.Fn ENGINE_get_default_EC -first appeared in OpenSSL 1.1.0 and has been available since -.Ox 6.5 . diff --git a/lib/libcrypto/man/ENGINE_init.3 b/lib/libcrypto/man/ENGINE_init.3 deleted file mode 100644 index d41d98a2f1b..00000000000 --- a/lib/libcrypto/man/ENGINE_init.3 +++ /dev/null @@ -1,134 +0,0 @@ -.\" $OpenBSD: ENGINE_init.3,v 1.2 2018/04/18 03:39:22 schwarze Exp $ -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: April 18 2018 $ -.Dt ENGINE_INIT 3 -.Os -.Sh NAME -.Nm ENGINE_init , -.Nm ENGINE_finish , -.Nm ENGINE_set_init_function , -.Nm ENGINE_set_finish_function , -.Nm ENGINE_get_init_function , -.Nm ENGINE_get_finish_function -.Nd initialize ENGINE objects -.Sh SYNOPSIS -.In openssl/engine.h -.Ft int -.Fo ENGINE_init -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_finish -.Fa "ENGINE *e" -.Fc -.Ft typedef int -.Fo (*ENGINE_GEN_INT_FUNC_PTR) -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_init_function -.Fa "ENGINE *e" -.Fa "ENGINE_GEN_INT_FUNC_PTR init_f" -.Fc -.Ft int -.Fo ENGINE_set_finish_function -.Fa "ENGINE *e" -.Fa "ENGINE_GEN_INT_FUNC_PTR finish_f" -.Fc -.Ft ENGINE_GEN_INT_FUNC_PTR -.Fo ENGINE_get_init_function -.Fa "const ENGINE *e" -.Fc -.Ft ENGINE_GEN_INT_FUNC_PTR -.Fo ENGINE_get_finish_function -.Fa "const ENGINE *e" -.Fc -.Sh DESCRIPTION -.Fn ENGINE_init -initializes -.Fa e -by calling the -.Fa init_f -previously installed with -.Fn ENGINE_set_init_function , -if any. -In case of success, it also increments both the structural -and the functional reference count by 1. -If no -.Fa init_f -was installed, -.Fn ENGINE_init -always succeeds. -Calling -.Fn ENGINE_init -again after it already succeeded always succeeds, but has no effect -except that it increments both the structural and the functional -reference count by 1. -.Pp -.Fn ENGINE_finish -decrements the functional reference count by 1. -When it reaches 0, it calls the -.Fa finish_f -previously installed with -.Fn ENGINE_set_finish_function , -if any. -If no -.Fa finish_f -was installed, -.Fn ENGINE_finish -always succeeds. -Unless -.Fa finish_f -fails, -.Fn ENGINE_finish -also calls -.Xr ENGINE_free 3 . -.Pp -.Fn ENGINE_init -is internally called by the functions documented in the -.Xr ENGINE_get_default_RSA 3 -manual page. -.Sh RETURN VALUES -.Fn ENGINE_init -and -.Fn ENGINE_finish -return 1 on success or 0 on error. -.Pp -.Fn ENGINE_set_init_function -and -.Fn ENGINE_set_finish_function -always return 1. -.Pp -.Fn ENGINE_get_init_function -and -.Fn ENGINE_get_finish_function -return a function pointer to the respective callback, or -.Dv NULL -if none is installed. -.Sh SEE ALSO -.Xr ENGINE_add 3 , -.Xr ENGINE_ctrl 3 , -.Xr ENGINE_get_default_RSA 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_default 3 , -.Xr ENGINE_set_flags 3 , -.Xr ENGINE_set_RSA 3 , -.Xr ENGINE_unregister_RSA 3 -.Sh HISTORY -These functions first appeared in OpenSSL 0.9.7 -and have been available since -.Ox 2.9 . diff --git a/lib/libcrypto/man/ENGINE_register_RSA.3 b/lib/libcrypto/man/ENGINE_register_RSA.3 deleted file mode 100644 index 5c63729cfc8..00000000000 --- a/lib/libcrypto/man/ENGINE_register_RSA.3 +++ /dev/null @@ -1,142 +0,0 @@ -.\" $OpenBSD: ENGINE_register_RSA.3,v 1.2 2018/04/18 03:39:22 schwarze Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: April 18 2018 $ -.Dt ENGINE_REGISTER_RSA 3 -.Os -.Sh NAME -.Nm ENGINE_register_RSA , -.Nm ENGINE_register_DSA , -.Nm ENGINE_register_ECDH , -.Nm ENGINE_register_ECDSA , -.Nm ENGINE_register_DH , -.Nm ENGINE_register_RAND , -.Nm ENGINE_register_STORE , -.Nm ENGINE_register_ciphers , -.Nm ENGINE_register_digests , -.Nm ENGINE_register_complete -.Nd register an ENGINE as implementing an algorithm -.Sh SYNOPSIS -.In openssl/engine.h -.Ft int -.Fo ENGINE_register_RSA -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_DSA -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_ECDH -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_ECDSA -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_DH -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_RAND -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_STORE -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_ciphers -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_digests -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_register_complete -.Fa "ENGINE *e" -.Fc -.Sh DESCRIPTION -In addition to the global table described in -.Xr ENGINE_add 3 , -the crypto library maintains several tables containing references to -.Vt ENGINE -objects implementing one specific cryptographic algorithm. -.Pp -The functions listed in the present manual page append -.Fa e -to the end of the table for the respective algorithm. -.Pp -If -.Fa e -does not contain a method for the requested algorithm, -these functions succeed without having any effect. -.Pp -If -.Fa e -is already registered for the given algorithm, -they move it to the end of the respective table. -.Pp -.Fn ENGINE_register_ciphers -and -.Fn ENGINE_register_digests -are special in so far as an engine may implement -more than one cipher or more than one digest. -In that case, -.Fa e -is registered for all the ciphers or digests it implements. -.Pp -.Fn ENGINE_register_complete -registers -.Fa e -for all algorithms it implements by calling all the other functions. -.Sh RETURN VALUES -These functions return 1 on success or 0 on error. -They only fail if insufficient memory is available. -.Sh SEE ALSO -.Xr ENGINE_add 3 , -.Xr ENGINE_get_default_RSA 3 , -.Xr ENGINE_init 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_all_RSA 3 , -.Xr ENGINE_set_default 3 , -.Xr ENGINE_set_RSA 3 , -.Xr ENGINE_unregister_RSA 3 -.Sh HISTORY -.Fn ENGINE_register_RSA , -.Fn ENGINE_register_DSA , -.Fn ENGINE_register_DH , -.Fn ENGINE_register_RAND , -.Fn ENGINE_register_ciphers , -.Fn ENGINE_register_digests , -and -.Fn ENGINE_register_complete -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . -.Pp -.Fn ENGINE_register_ECDH , -.Fn ENGINE_register_ECDSA , -and -.Fn ENGINE_register_STORE -first appeared in OpenSSL 0.9.8 and have been available since -.Ox 4.5 . -.Sh BUGS -.Fn ENGINE_register_complete -ignores all errors, even memory allocation failure, and always returns 1. diff --git a/lib/libcrypto/man/ENGINE_register_all_RSA.3 b/lib/libcrypto/man/ENGINE_register_all_RSA.3 deleted file mode 100644 index 3016eec3d4e..00000000000 --- a/lib/libcrypto/man/ENGINE_register_all_RSA.3 +++ /dev/null @@ -1,123 +0,0 @@ -.\" $OpenBSD: ENGINE_register_all_RSA.3,v 1.3 2018/04/18 03:39:22 schwarze Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: April 18 2018 $ -.Dt ENGINE_REGISTER_ALL_RSA 3 -.Os -.Sh NAME -.Nm ENGINE_register_all_RSA , -.Nm ENGINE_register_all_DSA , -.Nm ENGINE_register_all_ECDH , -.Nm ENGINE_register_all_ECDSA , -.Nm ENGINE_register_all_DH , -.Nm ENGINE_register_all_RAND , -.Nm ENGINE_register_all_STORE , -.Nm ENGINE_register_all_ciphers , -.Nm ENGINE_register_all_digests , -.Nm ENGINE_register_all_complete , -.Nm ENGINE_load_builtin_engines , -.Nm ENGINE_load_dynamic -.Nd register all engines as implementing an algorithm -.Sh SYNOPSIS -.In openssl/engine.h -.Ft void -.Fn ENGINE_register_all_RSA void -.Ft void -.Fn ENGINE_register_all_DSA void -.Ft void -.Fn ENGINE_register_all_ECDH void -.Ft void -.Fn ENGINE_register_all_ECDSA void -.Ft void -.Fn ENGINE_register_all_DH void -.Ft void -.Fn ENGINE_register_all_RAND void -.Ft void -.Fn ENGINE_register_all_STORE void -.Ft void -.Fn ENGINE_register_all_ciphers void -.Ft void -.Fn ENGINE_register_all_digests void -.Ft int -.Fn ENGINE_register_all_complete void -.Ft void -.Fn ENGINE_load_builtin_engines void -.Ft void -.Fn ENGINE_load_dynamic void -.Sh DESCRIPTION -These functions loop over all the -.Vt ENGINE -objects contained in the global table described in the -.Xr ENGINE_add 3 -manual page. -They register each object for the respective algorithm -by calling the corresponding function described in -.Xr ENGINE_register_RSA 3 . -.Pp -.Fn ENGINE_register_all_complete -calls -.Fn ENGINE_register_complete -in this way, except that it skips those -.Vt ENGINE -objects that have the -.Dv ENGINE_FLAGS_NO_REGISTER_ALL -flag set with -.Xr ENGINE_set_flags 3 . -.Pp -.Fn ENGINE_load_builtin_engines -calls -.Xr OPENSSL_init_crypto 3 -with no options, loads any built-in engines -that are enabled by default, and calls -.Fn ENGINE_register_all_complete . -Currently, LibreSSL does not provide any engines. -.Sy GOST -and -.Sy aesni -support is provided by the crypto library itself -and does not require any engines, not even built-in ones. -.Pp -.Fn ENGINE_load_dynamic -has no effect and is only provided for compatibility. -.Sh SEE ALSO -.Xr ENGINE_add 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_flags 3 , -.Xr OPENSSL_config 3 , -.Xr OPENSSL_init_crypto 3 -.Sh HISTORY -.Fn ENGINE_register_all_RSA , -.Fn ENGINE_register_all_DSA , -.Fn ENGINE_register_all_DH , -.Fn ENGINE_register_all_RAND , -.Fn ENGINE_register_all_ciphers , -.Fn ENGINE_register_all_digests , -.Fn ENGINE_register_all_complete , -.Fn ENGINE_load_builtin_engines , -and -.Fn ENGINE_load_dynamic -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . -.Pp -.Fn ENGINE_register_all_ECDH , -.Fn ENGINE_register_all_ECDSA , -and -.Fn ENGINE_register_all_STORE -first appeared in OpenSSL 0.9.8 and have been available since -.Ox 4.5 . diff --git a/lib/libcrypto/man/ENGINE_set_RSA.3 b/lib/libcrypto/man/ENGINE_set_RSA.3 deleted file mode 100644 index b2cec473bd5..00000000000 --- a/lib/libcrypto/man/ENGINE_set_RSA.3 +++ /dev/null @@ -1,317 +0,0 @@ -.\" $OpenBSD: ENGINE_set_RSA.3,v 1.7 2023/07/21 04:29:27 tb Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: July 21 2023 $ -.Dt ENGINE_SET_RSA 3 -.Os -.Sh NAME -.Nm ENGINE_set_RSA , -.Nm ENGINE_get_RSA , -.Nm ENGINE_set_DSA , -.Nm ENGINE_get_DSA , -.Nm ENGINE_set_EC , -.Nm ENGINE_get_EC , -.Nm ENGINE_set_DH , -.Nm ENGINE_get_DH , -.Nm ENGINE_set_RAND , -.Nm ENGINE_get_RAND , -.Nm ENGINE_set_STORE , -.Nm ENGINE_get_STORE , -.Nm ENGINE_set_ciphers , -.Nm ENGINE_get_ciphers , -.Nm ENGINE_get_cipher , -.Nm ENGINE_set_digests , -.Nm ENGINE_get_digests , -.Nm ENGINE_get_digest -.Nd install and retrieve function tables of crypto engines -.Sh SYNOPSIS -.In openssl/engine.h -.Ft int -.Fo ENGINE_set_RSA -.Fa "ENGINE *e" -.Fa "const RSA_METHOD *rsa_meth" -.Fc -.Ft const RSA_METHOD * -.Fo ENGINE_get_RSA -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_DSA -.Fa "ENGINE *e" -.Fa "const DSA_METHOD *dsa_meth" -.Fc -.Ft const DSA_METHOD * -.Fo ENGINE_get_DSA -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_EC -.Fa "ENGINE *e" -.Fa "const EC_KEY_METHOD *ec_meth" -.Fc -.Ft const EC_KEY_METHOD * -.Fo ENGINE_get_EC -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_DH -.Fa "ENGINE *e" -.Fa "const DH_METHOD *dh_meth" -.Fc -.Ft const DH_METHOD * -.Fo ENGINE_get_DH -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_RAND -.Fa "ENGINE *e" -.Fa "const RAND_METHOD *rand_meth" -.Fc -.Ft const RAND_METHOD * -.Fo ENGINE_get_RAND -.Fa "const ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_STORE -.Fa "ENGINE *e" -.Fa "const STORE_METHOD *rand_meth" -.Fc -.Ft const STORE_METHOD * -.Fo ENGINE_get_STORE -.Fa "const ENGINE *e" -.Fc -.Ft typedef int -.Fo (*ENGINE_CIPHERS_PTR) -.Fa "ENGINE *e" -.Fa "const EVP_CIPHER **impl" -.Fa "const int **nids" -.Fa "int nid" -.Fc -.Ft int -.Fo ENGINE_set_ciphers -.Fa "ENGINE *e" -.Fa "ENGINE_CIPHERS_PTR f" -.Fc -.Ft ENGINE_CIPHERS_PTR -.Fo ENGINE_get_ciphers -.Fa "const ENGINE *e" -.Fc -.Ft const EVP_CIPHER * -.Fo ENGINE_get_cipher -.Fa "ENGINE *e" -.Fa "int nid" -.Fc -.Ft typedef int -.Fo (*ENGINE_DIGESTS_PTR) -.Fa "ENGINE *e" -.Fa "const EVP_MD **impl" -.Fa "const int **nids" -.Fa "int nid" -.Fc -.Ft int -.Fo ENGINE_set_digests -.Fa "ENGINE *e" -.Fa "ENGINE_DIGESTS_PTR f" -.Fc -.Ft ENGINE_DIGESTS_PTR -.Fo ENGINE_get_digests -.Fa "const ENGINE *e" -.Fc -.Ft const EVP_MD * -.Fo ENGINE_get_digest -.Fa "ENGINE *e" -.Fa "int nid" -.Fc -.Sh DESCRIPTION -The -.Fn ENGINE_set_* -functions install a table of function pointers -implementing the respective algorithm in -.Fa e . -Partial information about the various method objects is available from -.Xr RSA_meth_new 3 , -.Xr RSA_get_default_method 3 , -.Xr DSA_meth_new 3 , -.Xr DSA_get_default_method 3 , -.Xr EC_KEY_get_default_method 3 , -.Xr DH_get_default_method 3 , -.Xr RAND_get_rand_method 3 , -.Xr EVP_get_cipherbynid 3 , -and -.Xr EVP_get_digestbynid 3 . -.Vt STORE_METHOD -is an incomplete type, and the pointers to it are not used for anything. -For complete descriptions of these types, -refer to the respective header files. -.Pp -The functions described in the -.Xr ENGINE_register_RSA 3 -and -.Xr ENGINE_set_default 3 -manual pages only have an effect after function pointers -were installed using the functions described here. -.Pp -.Fn ENGINE_set_ciphers -and -.Fn ENGINE_set_digests -are special in so far as the -.Vt ENGINE -structure does not provide fields to store function pointers -implementing ciphers or digests. -Instead, these two functions only install a callback to -retrieve implementations. -Where the pointers to the implementations are stored internally, -how they get initialized, and how the -.Vt ENGINE_CIPHERS_PTR -and -.Vt ENGINE_DIGESTS_PTR -callbacks retrieve them -is up to the implementation of each individual engine. -.Pp -If the -.Vt ENGINE_CIPHERS_PTR -and -.Vt ENGINE_DIGESTS_PTR -callbacks are called with a non-zero -.Fa nid , -they retrieve the implementation of that cipher or digest, -respectively. -In this case, a -.Dv NULL -pointer can be passed as the -.Fa nids -argument. -.Fn ENGINE_get_cipher -and -.Fn ENGINE_get_digest -call the callbacks installed in -.Fa e -in this way. -.Pp -If 0 is passed as the -.Fa nid -argument, an internal pointer -to the array of implementations available in -.Fa e -is returned in -.Pf * Fa impl , -and an internal pointer -to the array of corresponding identifiers in -.Pf * Fa nids . -The return value of the callback indicates -the number of implementations returned. -.Pp -The -.Fn ENGINE_get_* -functions retrieve the previously installed function tables. -They are used when constructing basic cryptographic objects -as shown in the following table: -.Bl -column "ENGINE_get_digestMM" -.It Accessor: Ta Called by: -.It Fn ENGINE_get_RSA Ta Xr RSA_new_method 3 , Xr RSA_new 3 -.It Fn ENGINE_get_DSA Ta Xr DSA_new_method 3 , Xr DSA_new 3 -.It Fn ENGINE_get_EC Ta Xr EC_KEY_new_method 3 , Xr EC_KEY_new 3 , -.Xr EC_KEY_new_by_curve_name 3 -.It Fn ENGINE_get_DH Ta Xr DH_new_method 3 , Xr DH_new 3 -.It Fn ENGINE_get_RAND Ta unused -.It Fn ENGINE_get_STORE Ta unused -.It Fn ENGINE_get_cipher Ta Xr EVP_CipherInit_ex 3 -.It Fn ENGINE_get_digest Ta Xr EVP_DigestInit_ex 3 -.El -.Sh RETURN VALUES -The -.Fn ENGINE_set_* -functions return 1 on success or 0 on error. -Currently, they cannot fail. -.Pp -The -.Fn ENGINE_get_* -functions return a method object for the respective algorithm, or -.Dv NULL -if none is installed. -.Pp -.Fn ENGINE_get_ciphers -and -.Fn ENGINE_get_digests -return a function pointer to the respective callback, or -.Dv NULL -if none is installed. -.Pp -.Fn ENGINE_get_cipher -returns an -.Vt EVP_CIPHER -object implementing the cipher -.Fa nid -or -.Dv NULL -if -.Fa e -does not implement that cipher. -.Pp -.Fn ENGINE_get_digest -returns an -.Vt EVP_MD -object implementing the digest -.Fa nid -or -.Dv NULL -if -.Fa e -does not implement that digest. -.Sh SEE ALSO -.Xr DSA_new 3 , -.Xr ENGINE_ctrl 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_default 3 , -.Xr ENGINE_set_flags 3 , -.Xr EVP_DigestInit 3 , -.Xr EVP_EncryptInit 3 , -.Xr RSA_new 3 -.Sh HISTORY -.Fn ENGINE_set_RSA , -.Fn ENGINE_get_RSA , -.Fn ENGINE_set_DSA , -.Fn ENGINE_get_DSA , -.Fn ENGINE_set_DH , -.Fn ENGINE_get_DH , -.Fn ENGINE_set_RAND , -.Fn ENGINE_get_RAND , -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 2.9 . -.Pp -.Fn ENGINE_set_ciphers , -.Fn ENGINE_get_ciphers , -.Fn ENGINE_get_cipher , -.Fn ENGINE_set_digests , -.Fn ENGINE_get_digests , -and -.Fn ENGINE_get_digest -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . -.Pp -.Fn ENGINE_set_STORE -and -.Fn ENGINE_get_STORE -first appeared in OpenSSL 0.9.8 and have been available since -.Ox 4.5 . -.Fn ENGINE_set_EC -and -.Fn ENGINE_get_EC -first appeared in OpenSSL 1.1.0 and have been available since -.Ox 6.5 . diff --git a/lib/libcrypto/man/ENGINE_set_default.3 b/lib/libcrypto/man/ENGINE_set_default.3 deleted file mode 100644 index c2655f2b9b1..00000000000 --- a/lib/libcrypto/man/ENGINE_set_default.3 +++ /dev/null @@ -1,186 +0,0 @@ -.\" $OpenBSD: ENGINE_set_default.3,v 1.4 2019/06/03 14:43:15 schwarze Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: June 3 2019 $ -.Dt ENGINE 3 -.Os -.Sh NAME -.Nm ENGINE_set_default , -.Nm ENGINE_set_default_string , -.Nm ENGINE_set_default_RSA , -.Nm ENGINE_set_default_DSA , -.Nm ENGINE_set_default_ECDH , -.Nm ENGINE_set_default_ECDSA , -.Nm ENGINE_set_default_DH , -.Nm ENGINE_set_default_RAND , -.Nm ENGINE_set_default_ciphers , -.Nm ENGINE_set_default_digests -.Nd register an ENGINE as the default for an algorithm -.Sh SYNOPSIS -.In openssl/engine.h -.Ft int -.Fo ENGINE_set_default_RSA -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default_DSA -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default_ECDH -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default_ECDSA -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default_DH -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default_RAND -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default_ciphers -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default_digests -.Fa "ENGINE *e" -.Fc -.Ft int -.Fo ENGINE_set_default -.Fa "ENGINE *e" -.Fa "unsigned int flags" -.Fc -.Ft int -.Fo ENGINE_set_default_string -.Fa "ENGINE *e" -.Fa "const char *list" -.Fc -.Sh DESCRIPTION -These functions register -.Fa e -as implementing the respective algorithm -like the functions described in the -.Xr ENGINE_register_RSA 3 -manual page do it. -In addition, they call -.Xr ENGINE_init 3 -on -.Fa e -and select -.Fa e -as the default implementation of the respective algorithm to be -returned by the functions described in -.Xr ENGINE_get_default_RSA 3 -in the future. -If another engine was previously selected -as the default implementation of the respective algorithm, -.Xr ENGINE_finish 3 -is called on that previous engine. -.Pp -If -.Fa e -implements more than one cipher or digest, -.Fn ENGINE_set_default_ciphers -and -.Fn ENGINE_set_default_digests -register and select it for all these ciphers and digests, respectively. -.Pp -.Fn ENGINE_set_default -registers -.Fa e -as the default implementation of all algorithms specified by the -.Fa flags -by calling the appropriate ones among the other functions. -Algorithms can be selected by combining any number of the -following constants with bitwise OR: -.Dv ENGINE_METHOD_ALL , -.Dv ENGINE_METHOD_RSA , -.Dv ENGINE_METHOD_DSA , -.Dv ENGINE_METHOD_ECDH , -.Dv ENGINE_METHOD_ECDSA , -.Dv ENGINE_METHOD_DH , -.Dv ENGINE_METHOD_RAND , -.Dv ENGINE_METHOD_CIPHERS , -.Dv ENGINE_METHOD_DIGESTS , -.Dv ENGINE_METHOD_PKEY_METHS , -and -.Dv ENGINE_METHOD_PKEY_ASN1_METHS . -.Pp -.Fn ENGINE_set_default_string -is similar except that it selects the algorithms according to the string -.Fa def_list , -which contains an arbitrary number of comma-separated keywords from -the following list: ALL, RSA, DSA, ECDH, ECDSA, DH, RAND, CIPHERS, -DIGESTS, PKEY_CRYPTO, PKEY_ASN1, and PKEY. -PKEY_CRYPTO corresponds to -.Dv ENGINE_METHOD_PKEY_METHS , -PKEY_ASN1 to -.Dv ENGINE_METHOD_PKEY_ASN1_METHS , -and PKEY selects both. -.Sh RETURN VALUES -These functions return 1 on success or 0 on error. -They fail if -.Xr ENGINE_init 3 -fails or if insufficient memory is available. -.Sh SEE ALSO -.Xr ENGINE_get_default_RSA 3 , -.Xr ENGINE_init 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_RSA 3 , -.Xr ENGINE_unregister_RSA 3 -.Sh HISTORY -.Fn ENGINE_set_default , -.Fn ENGINE_set_default_RSA , -.Fn ENGINE_set_default_DSA , -.Fn ENGINE_set_default_DH , -and -.Fn ENGINE_set_default_RAND -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 2.9 . -.Pp -.Fn ENGINE_set_default_string , -.Fn ENGINE_set_default_ciphers , -and -.Fn ENGINE_set_default_digests -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . -.Pp -.Fn ENGINE_set_default_ECDH -and -.Fn ENGINE_set_default_ECDSA -first appeared in OpenSSL 0.9.8 and have been available since -.Ox 4.5 . -.Sh CAVEATS -Failure of -.Xr ENGINE_finish 3 -is ignored. -.Sh BUGS -Even when -.Fn ENGINE_set_default -or -.Fn ENGINE_set_default_string -fail, they typically still register -.Fa e -for some algorithms, but usually not for all it could be registered -for by calling the individual functions. diff --git a/lib/libcrypto/man/ENGINE_set_flags.3 b/lib/libcrypto/man/ENGINE_set_flags.3 deleted file mode 100644 index 33e8f333cef..00000000000 --- a/lib/libcrypto/man/ENGINE_set_flags.3 +++ /dev/null @@ -1,92 +0,0 @@ -.\" $OpenBSD: ENGINE_set_flags.3,v 1.2 2018/04/18 03:39:22 schwarze Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: April 18 2018 $ -.Dt ENGINE_SET_FLAGS 3 -.Os -.Sh NAME -.Nm ENGINE_set_flags , -.Nm ENGINE_get_flags -.Nd modify the behaviour of an ENGINE object -.Sh SYNOPSIS -.In openssl/engine.h -.Ft int -.Fo ENGINE_set_flags -.Fa "ENGINE *e" -.Fa "int flags" -.Fc -.Ft int -.Fo ENGINE_get_flags -.Fa "const ENGINE *e" -.Fc -.Sh DESCRIPTION -.Fn ENGINE_set_flags -sets the flags attribute of -.Fa e -to the new -.Fa flags . -The previous state of the flags attribute is overwritten. -Flags that were previously set are cleared -unless they are also present in the new -.Fa flags . -.Pp -The -.Fa flags -argument can be the bitwise OR of zero or more -of the following constants: -.Bl -tag -width Ds -.It Dv ENGINE_FLAGS_BY_ID_COPY -.Xr ENGINE_by_id 3 -returns a shallow copy of the -.Vt ENGINE -object it found rather than incrementing the reference count -and returning a pointer to the original. -.It Dv ENGINE_FLAGS_MANUAL_CMD_CTRL -.Xr ENGINE_ctrl 3 -lets the function installed with -.Xr ENGINE_set_ctrl_function 3 -handle all commands except -.Dv ENGINE_CTRL_HAS_CTRL_FUNCTION , -even the builtin commands. -.It Dv ENGINE_FLAGS_NO_REGISTER_ALL -.Xr ENGINE_register_all_complete 3 -skips -.Fa e . -.El -.Sh RETURN VALUES -.Fn ENGINE_set_flags -always returns 1. -.Pp -.Fn ENGINE_get_flags -returns the -.Fa flags -attribute of -.Fa e . -.Sh SEE ALSO -.Xr ENGINE_by_id 3 , -.Xr ENGINE_ctrl 3 , -.Xr ENGINE_init 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_all_complete 3 , -.Xr ENGINE_set_RSA 3 -.Sh HISTORY -.Fn ENGINE_set_flags -and -.Fn ENGINE_get_flags -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . diff --git a/lib/libcrypto/man/ENGINE_unregister_RSA.3 b/lib/libcrypto/man/ENGINE_unregister_RSA.3 deleted file mode 100644 index d0373063825..00000000000 --- a/lib/libcrypto/man/ENGINE_unregister_RSA.3 +++ /dev/null @@ -1,119 +0,0 @@ -.\" $OpenBSD: ENGINE_unregister_RSA.3,v 1.3 2018/04/18 03:39:22 schwarze Exp $ -.\" content checked up to: -.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 -.\" -.\" Copyright (c) 2018 Ingo Schwarze -.\" -.\" Permission to use, copy, modify, and distribute this software for any -.\" purpose with or without fee is hereby granted, provided that the above -.\" copyright notice and this permission notice appear in all copies. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.\" -.Dd $Mdocdate: April 18 2018 $ -.Dt ENGINE_UNREGISTER_RSA 3 -.Os -.Sh NAME -.Nm ENGINE_unregister_RSA , -.Nm ENGINE_unregister_DSA , -.Nm ENGINE_unregister_ECDH , -.Nm ENGINE_unregister_ECDSA , -.Nm ENGINE_unregister_DH , -.Nm ENGINE_unregister_RAND , -.Nm ENGINE_unregister_STORE , -.Nm ENGINE_unregister_ciphers , -.Nm ENGINE_unregister_digests -.Nd revoke the registration of an ENGINE object -.Sh SYNOPSIS -.In openssl/engine.h -.Ft void -.Fo ENGINE_unregister_RSA -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_DSA -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_ECDH -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_ECDSA -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_DH -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_RAND -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_STORE -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_ciphers -.Fa "ENGINE *e" -.Fc -.Ft void -.Fo ENGINE_unregister_digests -.Fa "ENGINE *e" -.Fc -.Sh DESCRIPTION -These functions remove -.Fa e -from the list of -.Vt ENGINE -objects that were previously registered for the respective algorithm -with the functions described in -.Xr ENGINE_register_RSA 3 . -.Pp -If -.Fa e -is currently used as the default engine for the algorithm -as described in the -.Fn ENGINE_set_default 3 -and -.Fn ENGINE_get_default_RSA 3 -manual pages, -.Xr ENGINE_finish 3 -is also called. -.Pp -.Fn ENGINE_unregister_ciphers -and -.Fn ENGINE_unregister_digests -unregister -.Fa e -for all ciphers or digests, respectively. -.Sh SEE ALSO -.Xr ENGINE_cleanup 3 , -.Xr ENGINE_finish 3 , -.Xr ENGINE_new 3 , -.Xr ENGINE_register_RSA 3 , -.Xr ENGINE_set_default 3 -.Sh HISTORY -.Fn ENGINE_unregister_RSA , -.Fn ENGINE_unregister_DSA , -.Fn ENGINE_unregister_DH , -.Fn ENGINE_unregister_RAND , -.Fn ENGINE_unregister_ciphers , -and -.Fn ENGINE_unregister_digests -first appeared in OpenSSL 0.9.7 and have been available since -.Ox 3.2 . -.Pp -.Fn ENGINE_unregister_ECDH , -.Fn ENGINE_unregister_ECDSA , -and -.Fn ENGINE_unregister_STORE -first appeared in OpenSSL 0.9.8 and have been available since -.Ox 4.5 . diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile index f42e9327ae2..01be881165b 100644 --- a/lib/libcrypto/man/Makefile +++ b/lib/libcrypto/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.276 2023/09/29 08:57:49 tb Exp $ +# $OpenBSD: Makefile,v 1.277 2023/11/19 10:36:14 tb Exp $ .include @@ -140,17 +140,7 @@ MAN= \ EC_KEY_new.3 \ EC_POINT_add.3 \ EC_POINT_new.3 \ - ENGINE_add.3 \ - ENGINE_ctrl.3 \ - ENGINE_get_default_RSA.3 \ - ENGINE_init.3 \ ENGINE_new.3 \ - ENGINE_register_RSA.3 \ - ENGINE_register_all_RSA.3 \ - ENGINE_set_RSA.3 \ - ENGINE_set_default.3 \ - ENGINE_set_flags.3 \ - ENGINE_unregister_RSA.3 \ ERR.3 \ ERR_GET_LIB.3 \ ERR_asprintf_error_data.3 \