aboutsummaryrefslogtreecommitdiff
path: root/secure/lib/libcrypto/man/man3/ENGINE_add.3
diff options
context:
space:
mode:
Diffstat (limited to 'secure/lib/libcrypto/man/man3/ENGINE_add.3')
-rw-r--r--secure/lib/libcrypto/man/man3/ENGINE_add.395
1 files changed, 49 insertions, 46 deletions
diff --git a/secure/lib/libcrypto/man/man3/ENGINE_add.3 b/secure/lib/libcrypto/man/man3/ENGINE_add.3
index 39fef76e327e..ab07a7b8afea 100644
--- a/secure/lib/libcrypto/man/man3/ENGINE_add.3
+++ b/secure/lib/libcrypto/man/man3/ENGINE_add.3
@@ -1,5 +1,5 @@
.\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -52,10 +52,13 @@
. \}
.\}
.rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
.\" ========================================================================
.\"
.IX Title "ENGINE_ADD 3ossl"
-.TH ENGINE_ADD 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ENGINE_ADD 3ossl 2026-04-07 3.5.6 OpenSSL
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -235,7 +238,7 @@ Applications should instead use the provider APIs.
These functions create, manipulate, and use cryptographic modules in the
form of \fBENGINE\fR objects. These objects act as containers for
implementations of cryptographic algorithms, and support a
-reference-counted mechanism to allow them to be dynamically loaded in and
+reference\-counted mechanism to allow them to be dynamically loaded in and
out of the running application.
.PP
The cryptographic functionality that can be provided by an \fBENGINE\fR
@@ -257,7 +260,7 @@ the underlying ENGINE object. Ie. one should obtain a new reference when
making copies of an ENGINE pointer if the copies will be used (and
released) independently.
.PP
-ENGINE objects have two levels of reference-counting to match the way in
+ENGINE objects have two levels of reference\-counting to match the way in
which the objects are used. At the most basic level, each ENGINE pointer is
inherently a \fBstructural\fR reference \- a structural reference is required
to use the pointer value at all, as this kind of reference is a guarantee
@@ -265,13 +268,13 @@ that the structure can not be deallocated until the reference is released.
.PP
However, a structural reference provides no guarantee that the ENGINE is
initialised and able to use any of its cryptographic
-implementations. Indeed it's quite possible that most ENGINEs will not
+implementations. Indeed it\*(Aqs quite possible that most ENGINEs will not
initialise at all in typical environments, as ENGINEs are typically used to
-support specialised hardware. To use an ENGINE's functionality, you need a
+support specialised hardware. To use an ENGINE\*(Aqs functionality, you need a
\&\fBfunctional\fR reference. This kind of reference can be considered a
specialised form of structural reference, because each functional reference
implicitly contains a structural reference as well \- however to avoid
-difficult-to-find programming bugs, it is recommended to treat the two
+difficult\-to\-find programming bugs, it is recommended to treat the two
kinds of reference independently. If you have a functional reference to an
ENGINE, you have a guarantee that the ENGINE has been initialised and
is ready to perform cryptographic operations, and will remain initialised
@@ -280,7 +283,7 @@ until after you have released your reference.
\&\fIStructural references\fR
.PP
This basic type of reference is used for instantiating new ENGINEs,
-iterating across OpenSSL's internal linked-list of loaded
+iterating across OpenSSL\*(Aqs internal linked\-list of loaded
ENGINEs, reading information about an ENGINE, etc. Essentially a structural
reference is sufficient if you only need to query or manipulate the data of
an ENGINE implementation rather than use its functionality.
@@ -298,20 +301,20 @@ It should also be noted that many ENGINE API function calls that accept a
structural reference will internally obtain another reference \- typically
this happens whenever the supplied ENGINE will be needed by OpenSSL after
the function has returned. Eg. the function to add a new ENGINE to
-OpenSSL's internal list is \fBENGINE_add()\fR \- if this function returns success,
+OpenSSL\*(Aqs internal list is \fBENGINE_add()\fR \- if this function returns success,
then OpenSSL will have stored a new structural reference internally so the
caller is still responsible for freeing their own reference with
\&\fBENGINE_free()\fR when they are finished with it. In a similar way, some
functions will automatically release the structural reference passed to it
-if part of the function's job is to do so. Eg. the \fBENGINE_get_next()\fR and
+if part of the function\*(Aqs job is to do so. Eg. the \fBENGINE_get_next()\fR and
\&\fBENGINE_get_prev()\fR functions are used for iterating across the internal
ENGINE list \- they will return a new structural reference to the next (or
previous) ENGINE in the list or NULL if at the end (or beginning) of the
list, but in either case the structural reference passed to the function is
released on behalf of the caller.
.PP
-To clarify a particular function's handling of references, one should
-always consult that function's documentation "man" page, or failing that
+To clarify a particular function\*(Aqs handling of references, one should
+always consult that function\*(Aqs documentation "man" page, or failing that
the \fI<openssl/engine.h>\fR header file includes some hints.
.PP
\&\fIFunctional references\fR
@@ -324,7 +327,7 @@ operational ENGINE for a given cryptographic purpose.
.PP
To obtain a functional reference from an existing structural reference,
call the \fBENGINE_init()\fR function. This returns zero if the ENGINE was not
-already operational and couldn't be successfully initialised (e.g. lack of
+already operational and couldn\*(Aqt be successfully initialised (e.g. lack of
system drivers, no special hardware attached, etc), otherwise it will
return nonzero to indicate that the ENGINE is now operational and will
have allocated a new \fBfunctional\fR reference to the ENGINE. All functional
@@ -336,17 +339,17 @@ default implementation for a given task, e.g. by \fBENGINE_get_default_RSA()\fR,
\&\fBENGINE_get_default_cipher_engine()\fR, etc. These are discussed in the next
section, though they are not usually required by application programmers as
they are used automatically when creating and using the relevant
-algorithm-specific types in OpenSSL, such as RSA, DSA, EVP_CIPHER_CTX, etc.
+algorithm\-specific types in OpenSSL, such as RSA, DSA, EVP_CIPHER_CTX, etc.
.SS "Default implementations"
.IX Subsection "Default implementations"
For each supported abstraction, the ENGINE code maintains an internal table
of state to control which implementations are available for a given
abstraction and which should be used by default. These implementations are
-registered in the tables and indexed by an 'nid' value, because
+registered in the tables and indexed by an \*(Aqnid\*(Aq value, because
abstractions like EVP_CIPHER and EVP_DIGEST support many distinct
algorithms and modes, and ENGINEs can support arbitrarily many of them.
In the case of other abstractions like RSA, DSA, etc, there is only one
-"algorithm" so all implementations implicitly register using the same 'nid'
+"algorithm" so all implementations implicitly register using the same \*(Aqnid\*(Aq
index.
.PP
When a default ENGINE is requested for a given abstraction/algorithm/mode, (e.g.
@@ -365,16 +368,16 @@ table trying to initialise each of them in turn, in case one of them is
operational. If it returns a functional reference to an ENGINE, it will
also cache another reference to speed up processing future queries (without
needing to iterate across the table). Likewise, it will cache a NULL
-response if no ENGINE was available so that future queries won't repeat the
+response if no ENGINE was available so that future queries won\*(Aqt repeat the
same iteration unless the state table changes. This behaviour can also be
changed; if the ENGINE_TABLE_FLAG_NOINIT flag is set (using
\&\fBENGINE_set_table_flags()\fR), no attempted initialisations will take place,
-instead the only way for the state table to return a non-NULL ENGINE to the
+instead the only way for the state table to return a non\-NULL ENGINE to the
"get_default" query will be if one is expressly set in the table. Eg.
\&\fBENGINE_set_default_RSA()\fR does the same job as \fBENGINE_register_RSA()\fR except
-that it also sets the state table's cached response for the "get_default"
+that it also sets the state table\*(Aqs cached response for the "get_default"
query. In the case of abstractions like EVP_CIPHER, where implementations are
-indexed by 'nid', these flags and cached-responses are distinct for each 'nid'
+indexed by \*(Aqnid\*(Aq, these flags and cached\-responses are distinct for each \*(Aqnid\*(Aq
value.
.SS "Application requirements"
.IX Subsection "Application requirements"
@@ -383,7 +386,7 @@ support to make the most useful elements of the ENGINE functionality
available to the user. The first thing to consider is whether the
programmer wishes to make alternative ENGINE modules available to the
application and user. OpenSSL maintains an internal linked list of
-"visible" ENGINEs from which it has to operate \- at start-up, this list is
+"visible" ENGINEs from which it has to operate \- at start\-up, this list is
empty and in fact if an application does not call any ENGINE API calls and
it uses static linking against openssl, then the resulting application
binary will not contain any alternative ENGINE code at all. So the first
@@ -392,18 +395,18 @@ made visible to OpenSSL \- this is controlled by calling the various "load"
functions.
.PP
The fact that ENGINEs are made visible to OpenSSL (and thus are linked into
-the program and loaded into memory at run-time) does not mean they are
+the program and loaded into memory at run\-time) does not mean they are
"registered" or called into use by OpenSSL automatically \- that behaviour
is something for the application to control. Some applications
will want to allow the user to specify exactly which ENGINE they want used
if any is to be used at all. Others may prefer to load all support and have
-OpenSSL automatically use at run-time any ENGINE that is able to
+OpenSSL automatically use at run\-time any ENGINE that is able to
successfully initialise \- i.e. to assume that this corresponds to
acceleration hardware attached to the machine or some such thing. There are
probably numerous other ways in which applications may prefer to handle
things, so we will simply illustrate the consequences as they apply to a
couple of simple cases and leave developers to consider these and the
-source code to openssl's built-in utilities as guides.
+source code to openssl\*(Aqs built\-in utilities as guides.
.PP
If no ENGINE API functions are called within an application, then OpenSSL
will not allocate any internal resources. Prior to OpenSSL 1.1.0, however,
@@ -412,11 +415,11 @@ call \fBENGINE_cleanup()\fR before the program exits.
.PP
\&\fIUsing a specific ENGINE implementation\fR
.PP
-Here we'll assume an application has been configured by its user or admin
+Here we\*(Aqll assume an application has been configured by its user or admin
to want to use the "ACME" ENGINE if it is available in the version of
OpenSSL the application was compiled with. If it is available, it should be
used by default for all RSA, DSA, and symmetric cipher operations, otherwise
-OpenSSL should use its built-in software as per usual. The following code
+OpenSSL should use its built\-in software as per usual. The following code
illustrates how to approach this;
.PP
.Vb 10
@@ -446,9 +449,9 @@ illustrates how to approach this;
\& ENGINE_free(e);
.Ve
.PP
-\&\fIAutomatically using built-in ENGINE implementations\fR
+\&\fIAutomatically using built\-in ENGINE implementations\fR
.PP
-Here we'll assume we want to load and register all ENGINE implementations
+Here we\*(Aqll assume we want to load and register all ENGINE implementations
bundled with OpenSSL, such that for any cryptographic algorithm required by
OpenSSL \- if there is an ENGINE that implements it and can be initialised,
it should be used. The following code illustrates how this can work;
@@ -460,7 +463,7 @@ it should be used. The following code illustrates how this can work;
\& ENGINE_register_all_complete();
.Ve
.PP
-That's all that's required. Eg. the next time OpenSSL tries to set up an
+That\*(Aqs all that\*(Aqs required. Eg. the next time OpenSSL tries to set up an
RSA key, any bundled ENGINEs that implement RSA_METHOD will be passed to
\&\fBENGINE_init()\fR and if any of those succeed, that ENGINE will be set as the
default for RSA use from then on.
@@ -469,7 +472,7 @@ default for RSA use from then on.
There is a mechanism supported by the ENGINE framework that allows each
ENGINE implementation to define an arbitrary set of configuration
"commands" and expose them to OpenSSL and any applications based on
-OpenSSL. This mechanism is entirely based on the use of name-value pairs
+OpenSSL. This mechanism is entirely based on the use of name\-value pairs
and assumes ASCII input (no unicode or UTF for now!), so it is ideal if
applications want to provide a transparent way for users to provide
arbitrary configuration "directives" directly to such ENGINEs. It is also
@@ -488,22 +491,22 @@ control commands; the first is to provide the necessary details to the
implementation (which may know nothing at all specific to the host system)
so that it can be initialised for use. This could include the path to any
driver or config files it needs to load, required network addresses,
-smart-card identifiers, passwords to initialise protected devices,
+smart\-card identifiers, passwords to initialise protected devices,
logging information, etc etc. This class of commands typically needs to be
passed to an ENGINE \fBbefore\fR attempting to initialise it, i.e. before
calling \fBENGINE_init()\fR. The other class of commands consist of settings or
operations that tweak certain behaviour or cause certain operations to take
place, and these commands may work either before or after \fBENGINE_init()\fR, or
in some cases both. ENGINE implementations should provide indications of
-this in the descriptions attached to built-in control commands and/or in
+this in the descriptions attached to built\-in control commands and/or in
external product documentation.
.PP
\&\fIIssuing control commands to an ENGINE\fR
.PP
-Let's illustrate by example; a function for which the caller supplies the
-name of the ENGINE it wishes to use, a table of string-pairs for use before
+Let\*(Aqs illustrate by example; a function for which the caller supplies the
+name of the ENGINE it wishes to use, a table of string\-pairs for use before
initialisation, and another table for use after initialisation. Note that
-the string-pairs used for control commands consist of a command "name"
+the string\-pairs used for control commands consist of a command "name"
followed by the command "parameter" \- the parameter could be NULL in some
cases but the name can not. This function should initialise the ENGINE
(issuing the "pre" commands beforehand and the "post" commands afterwards)
@@ -554,18 +557,18 @@ boolean success or failure.
Note that \fBENGINE_ctrl_cmd_string()\fR accepts a boolean argument that can
relax the semantics of the function \- if set nonzero it will only return
failure if the ENGINE supported the given command name but failed while
-executing it, if the ENGINE doesn't support the command name it will simply
+executing it, if the ENGINE doesn\*(Aqt support the command name it will simply
return success without doing anything. In this case we assume the user is
only supplying commands specific to the given ENGINE so we set this to
FALSE.
.PP
\&\fIDiscovering supported control commands\fR
.PP
-It is possible to discover at run-time the names, numerical-ids, descriptions
+It is possible to discover at run\-time the names, numerical\-ids, descriptions
and input parameters of the control commands supported by an ENGINE using a
structural reference. Note that some control commands are defined by OpenSSL
itself and it will intercept and handle these control commands on behalf of the
-ENGINE, i.e. the ENGINE's \fBctrl()\fR handler is not used for the control command.
+ENGINE, i.e. the ENGINE\*(Aqs \fBctrl()\fR handler is not used for the control command.
\&\fI<openssl/engine.h>\fR defines an index, ENGINE_CMD_BASE, that all control
commands implemented by ENGINEs should be numbered from. Any command value
lower than this symbol is considered a "generic" command is handled directly
@@ -590,9 +593,9 @@ Whilst these commands are automatically processed by the OpenSSL framework code,
they use various properties exposed by each ENGINE to process these
queries. An ENGINE has 3 properties it exposes that can affect how this behaves;
it can supply a \fBctrl()\fR handler, it can specify ENGINE_FLAGS_MANUAL_CMD_CTRL in
-the ENGINE's flags, and it can expose an array of control command descriptions.
+the ENGINE\*(Aqs flags, and it can expose an array of control command descriptions.
If an ENGINE specifies the ENGINE_FLAGS_MANUAL_CMD_CTRL flag, then it will
-simply pass all these "core" control commands directly to the ENGINE's \fBctrl()\fR
+simply pass all these "core" control commands directly to the ENGINE\*(Aqs \fBctrl()\fR
handler (and thus, it must have supplied one), so it is up to the ENGINE to
reply to these "discovery" commands itself. If that flag is not set, then the
OpenSSL framework code will work with the following rules:
@@ -609,7 +612,7 @@ OpenSSL framework code will work with the following rules:
\& all other commands proceed processing ...
.Ve
.PP
-If the ENGINE's array of control commands is empty then all other commands will
+If the ENGINE\*(Aqs array of control commands is empty then all other commands will
fail, otherwise; ENGINE_CTRL_GET_FIRST_CMD_TYPE returns the identifier of
the first command supported by the ENGINE, ENGINE_GET_NEXT_CMD_TYPE takes the
identifier of a command supported by the ENGINE and returns the next command
@@ -619,7 +622,7 @@ command name exists, and the remaining commands take a command identifier and
return properties of the corresponding commands. All except
ENGINE_CTRL_GET_FLAGS return the string length of a command name or description,
or populate a supplied character buffer with a copy of the command name or
-description. ENGINE_CTRL_GET_FLAGS returns a bitwise-OR'd mask of the following
+description. ENGINE_CTRL_GET_FLAGS returns a bitwise\-OR\*(Aqd mask of the following
possible values:
.PP
.Vb 4
@@ -631,8 +634,8 @@ possible values:
.PP
If the ENGINE_CMD_FLAG_INTERNAL flag is set, then any other flags are purely
informational to the caller \- this flag will prevent the command being usable
-for any higher-level ENGINE functions such as \fBENGINE_ctrl_cmd_string()\fR.
-"INTERNAL" commands are not intended to be exposed to text-based configuration
+for any higher\-level ENGINE functions such as \fBENGINE_ctrl_cmd_string()\fR.
+"INTERNAL" commands are not intended to be exposed to text\-based configuration
by applications, administrations, users, etc. These can support arbitrary
operations via \fBENGINE_ctrl()\fR, including passing to and/or from the control
commands data of any arbitrary type. These commands are supported in the
@@ -646,7 +649,7 @@ extension).
.IP \fBOPENSSL_ENGINES\fR 4
.IX Item "OPENSSL_ENGINES"
The path to the engines directory.
-Ignored in set-user-ID and set-group-ID programs.
+Ignored in set\-user\-ID and set\-group\-ID programs.
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBENGINE_get_first()\fR, \fBENGINE_get_last()\fR, \fBENGINE_get_next()\fR and \fBENGINE_get_prev()\fR
@@ -712,7 +715,7 @@ error occurred.
\&\fBENGINE_get_flags()\fR returns an integer representing the ENGINE flags which are
used to control various behaviours of an ENGINE.
.PP
-\&\fBENGINE_get_cmd_defns()\fR returns an \fBENGINE_CMD_DEFN\fR structure or NULL if it's
+\&\fBENGINE_get_cmd_defns()\fR returns an \fBENGINE_CMD_DEFN\fR structure or NULL if it\*(Aqs
not set.
.PP
\&\fBENGINE_load_private_key()\fR and \fBENGINE_load_public_key()\fR return a valid \fBEVP_PKEY\fR