aboutsummaryrefslogtreecommitdiff
path: root/secure/lib/libcrypto/man/man3/OSSL_PARAM.3
diff options
context:
space:
mode:
Diffstat (limited to 'secure/lib/libcrypto/man/man3/OSSL_PARAM.3')
-rw-r--r--secure/lib/libcrypto/man/man3/OSSL_PARAM.3230
1 files changed, 77 insertions, 153 deletions
diff --git a/secure/lib/libcrypto/man/man3/OSSL_PARAM.3 b/secure/lib/libcrypto/man/man3/OSSL_PARAM.3
index a23a7d4711da..0d8778bdb7bf 100644
--- a/secure/lib/libcrypto/man/man3/OSSL_PARAM.3
+++ b/secure/lib/libcrypto/man/man3/OSSL_PARAM.3
@@ -1,4 +1,5 @@
-.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
+.\" -*- mode: troff; coding: utf-8 -*-
+.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -15,29 +16,12 @@
.ft R
.fi
..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
. ds C`
. ds C'
'br\}
@@ -68,77 +52,17 @@
. \}
.\}
.rr rF
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "OSSL_PARAM 3ossl"
-.TH OSSL_PARAM 3ossl "2023-09-19" "3.0.11" "OpenSSL"
+.TH OSSL_PARAM 3ossl 2025-07-01 3.5.1 OpenSSL
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
-.SH "NAME"
+.SH NAME
OSSL_PARAM \- a structure to pass or request object parameters
-.SH "SYNOPSIS"
+.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
\& #include <openssl/core.h>
@@ -146,15 +70,15 @@ OSSL_PARAM \- a structure to pass or request object parameters
\& typedef struct ossl_param_st OSSL_PARAM;
\& struct ossl_param_st {
\& const char *key; /* the name of the parameter */
-\& unsigned char data_type; /* declare what kind of content is in data */
+\& unsigned int data_type; /* declare what kind of content is in data */
\& void *data; /* value being passed in or out */
\& size_t data_size; /* data size */
\& size_t return_size; /* returned size */
\& };
.Ve
-.SH "DESCRIPTION"
+.SH DESCRIPTION
.IX Header "DESCRIPTION"
-\&\fB\s-1OSSL_PARAM\s0\fR is a type that allows passing arbitrary data for some
+\&\fBOSSL_PARAM\fR is a type that allows passing arbitrary data for some
object between two parties that have no or very little shared
knowledge about their respective internal structures for that object.
.PP
@@ -163,68 +87,68 @@ parameters for an object, or wants to find out some parameters of an
object.
.PP
Arrays of this type can be used for the following purposes:
-.IP "\(bu" 4
+.IP \(bu 4
Setting parameters for some object
.Sp
-The caller sets up the \fB\s-1OSSL_PARAM\s0\fR array and calls some function
+The caller sets up the \fBOSSL_PARAM\fR array and calls some function
(the \fIsetter\fR) that has intimate knowledge about the object that can
-take the data from the \fB\s-1OSSL_PARAM\s0\fR array and assign them in a
+take the data from the \fBOSSL_PARAM\fR array and assign them in a
suitable form for the internal structure of the object.
-.IP "\(bu" 4
+.IP \(bu 4
Request parameters of some object
.Sp
-The caller (the \fIrequester\fR) sets up the \fB\s-1OSSL_PARAM\s0\fR array and
+The caller (the \fIrequester\fR) sets up the \fBOSSL_PARAM\fR array and
calls some function (the \fIresponder\fR) that has intimate knowledge
about the object, which can take the internal data of the object and
copy (possibly convert) that to the memory prepared by the
-\&\fIrequester\fR and pointed at with the \fB\s-1OSSL_PARAM\s0\fR \fIdata\fR.
-.IP "\(bu" 4
+\&\fIrequester\fR and pointed at with the \fBOSSL_PARAM\fR \fIdata\fR.
+.IP \(bu 4
Request parameter descriptors
.Sp
-The caller gets an array of constant \fB\s-1OSSL_PARAM\s0\fR, which describe
+The caller gets an array of constant \fBOSSL_PARAM\fR, which describe
available parameters and some of their properties; name, data type and
expected data size.
For a detailed description of each field for this use, see the field
descriptions below.
.Sp
The caller may then use the information from this descriptor array to
-build up its own \fB\s-1OSSL_PARAM\s0\fR array to pass down to a \fIsetter\fR or
+build up its own \fBOSSL_PARAM\fR array to pass down to a \fIsetter\fR or
\&\fIresponder\fR.
.PP
-Normally, the order of the an \fB\s-1OSSL_PARAM\s0\fR array is not relevant.
+Normally, the order of the an \fBOSSL_PARAM\fR array is not relevant.
However, if the \fIresponder\fR can handle multiple elements with the
same key, those elements must be handled in the order they are in.
.PP
-An \fB\s-1OSSL_PARAM\s0\fR array must have a terminating element, where \fIkey\fR
-is \s-1NULL.\s0 The usual full terminating template is:
+An \fBOSSL_PARAM\fR array must have a terminating element, where \fIkey\fR
+is NULL. The usual full terminating template is:
.PP
.Vb 1
\& { NULL, 0, NULL, 0, 0 }
.Ve
.PP
-This can also be specified using \s-1\fBOSSL_PARAM_END\s0\fR\|(3).
+This can also be specified using \fBOSSL_PARAM_END\fR\|(3).
.SS "Functional support"
.IX Subsection "Functional support"
Libcrypto offers a limited set of helper functions to handle
-\&\fB\s-1OSSL_PARAM\s0\fR items and arrays, please see \fBOSSL_PARAM_get_int\fR\|(3).
+\&\fBOSSL_PARAM\fR items and arrays, please see \fBOSSL_PARAM_get_int\fR\|(3).
Developers are free to extend or replace those as they see fit.
-.SS "\fB\s-1OSSL_PARAM\s0\fP fields"
+.SS "\fBOSSL_PARAM\fP fields"
.IX Subsection "OSSL_PARAM fields"
-.IP "\fIkey\fR" 4
+.IP \fIkey\fR 4
.IX Item "key"
The identity of the parameter in the form of a string.
.Sp
-In an \fB\s-1OSSL_PARAM\s0\fR array, an item with this field set to \s-1NULL\s0 is
+In an \fBOSSL_PARAM\fR array, an item with this field set to NULL is
considered a terminating item.
-.IP "\fIdata_type\fR" 4
+.IP \fIdata_type\fR 4
.IX Item "data_type"
The \fIdata_type\fR is a value that describes the type and organization of
the data.
-See \*(L"Supported types\*(R" below for a description of the types.
-.IP "\fIdata\fR" 4
+See "Supported types" below for a description of the types.
+.IP \fIdata\fR 4
.IX Item "data"
.PD 0
-.IP "\fIdata_size\fR" 4
+.IP \fIdata_size\fR 4
.IX Item "data_size"
.PD
\&\fIdata\fR is a pointer to the memory where the parameter data is (when
@@ -233,35 +157,35 @@ and \fIdata_size\fR is its size in bytes.
The organization of the data depends on the parameter type and flag.
.Sp
The \fIdata_size\fR needs special attention with the parameter type
-\&\fB\s-1OSSL_PARAM_UTF8_STRING\s0\fR in relation to C strings. When setting
+\&\fBOSSL_PARAM_UTF8_STRING\fR in relation to C strings. When setting
parameters, the size should be set to the length of the string, not
-counting the terminating \s-1NUL\s0 byte. When requesting parameters, the
+counting the terminating NUL byte. When requesting parameters, the
size should be set to the size of the buffer to be populated, which
-should accommodate enough space for a terminating \s-1NUL\s0 byte.
+should accommodate enough space for a terminating NUL byte.
.Sp
-When \fIrequesting parameters\fR, it's acceptable for \fIdata\fR to be \s-1NULL.\s0
+When \fIrequesting parameters\fR, it's acceptable for \fIdata\fR to be NULL.
This can be used by the \fIrequester\fR to figure out dynamically exactly
how much buffer space is needed to store the parameter data.
In this case, \fIdata_size\fR is ignored.
.Sp
-When the \fB\s-1OSSL_PARAM\s0\fR is used as a parameter descriptor, \fIdata\fR
+When the \fBOSSL_PARAM\fR is used as a parameter descriptor, \fIdata\fR
should be ignored.
If \fIdata_size\fR is zero, it means that an arbitrary data size is
accepted, otherwise it specifies the maximum size allowed.
-.IP "\fIreturn_size\fR" 4
+.IP \fIreturn_size\fR 4
.IX Item "return_size"
-When an array of \fB\s-1OSSL_PARAM\s0\fR is used to request data, the
+When an array of \fBOSSL_PARAM\fR is used to request data, the
\&\fIresponder\fR must set this field to indicate size of the parameter
data, including padding as the case may be.
In case the \fIdata_size\fR is an unsuitable size for the data, the
\&\fIresponder\fR must still set this field to indicate the minimum data
size required.
-(further notes on this in \*(L"\s-1NOTES\*(R"\s0 below).
+(further notes on this in "NOTES" below).
.Sp
-When the \fB\s-1OSSL_PARAM\s0\fR is used as a parameter descriptor,
+When the \fBOSSL_PARAM\fR is used as a parameter descriptor,
\&\fIreturn_size\fR should be ignored.
.PP
-\&\fB\s-1NOTE:\s0\fR
+\&\fBNOTE:\fR
.PP
The key names and associated types are defined by the entity that
offers these parameters, i.e. names for parameters provided by the
@@ -271,38 +195,38 @@ except for the pointer form of strings (see data type descriptions
below).
Entities that want to set or request parameters need to know what
those keys are and of what type, any functionality between those two
-entities should remain oblivious and just pass the \fB\s-1OSSL_PARAM\s0\fR array
+entities should remain oblivious and just pass the \fBOSSL_PARAM\fR array
along.
.SS "Supported types"
.IX Subsection "Supported types"
The \fIdata_type\fR field can be one of the following types:
-.IP "\fB\s-1OSSL_PARAM_INTEGER\s0\fR" 4
+.IP \fBOSSL_PARAM_INTEGER\fR 4
.IX Item "OSSL_PARAM_INTEGER"
.PD 0
-.IP "\fB\s-1OSSL_PARAM_UNSIGNED_INTEGER\s0\fR" 4
+.IP \fBOSSL_PARAM_UNSIGNED_INTEGER\fR 4
.IX Item "OSSL_PARAM_UNSIGNED_INTEGER"
.PD
The parameter data is an integer (signed or unsigned) of arbitrary
length, organized in native form, i.e. most significant byte first on
Big-Endian systems, and least significant byte first on Little-Endian
systems.
-.IP "\fB\s-1OSSL_PARAM_REAL\s0\fR" 4
+.IP \fBOSSL_PARAM_REAL\fR 4
.IX Item "OSSL_PARAM_REAL"
The parameter data is a floating point value in native form.
-.IP "\fB\s-1OSSL_PARAM_UTF8_STRING\s0\fR" 4
+.IP \fBOSSL_PARAM_UTF8_STRING\fR 4
.IX Item "OSSL_PARAM_UTF8_STRING"
The parameter data is a printable string.
-.IP "\fB\s-1OSSL_PARAM_OCTET_STRING\s0\fR" 4
+.IP \fBOSSL_PARAM_OCTET_STRING\fR 4
.IX Item "OSSL_PARAM_OCTET_STRING"
The parameter data is an arbitrary string of bytes.
-.IP "\fB\s-1OSSL_PARAM_UTF8_PTR\s0\fR" 4
+.IP \fBOSSL_PARAM_UTF8_PTR\fR 4
.IX Item "OSSL_PARAM_UTF8_PTR"
The parameter data is a pointer to a printable string.
.Sp
-The difference between this and \fB\s-1OSSL_PARAM_UTF8_STRING\s0\fR is that \fIdata\fR
+The difference between this and \fBOSSL_PARAM_UTF8_STRING\fR is that \fIdata\fR
doesn't point directly at the data, but to a pointer that points to the data.
.Sp
-If there is any uncertainty about which to use, \fB\s-1OSSL_PARAM_UTF8_STRING\s0\fR is
+If there is any uncertainty about which to use, \fBOSSL_PARAM_UTF8_STRING\fR is
almost certainly the correct choice.
.Sp
This is used to indicate that constant data is or will be passed,
@@ -319,15 +243,15 @@ Note that the use of this type is \fBfragile\fR and can only be safely
used for data that remains constant and in a constant location for a
long enough duration (such as the life-time of the entity that
offers these parameters).
-.IP "\fB\s-1OSSL_PARAM_OCTET_PTR\s0\fR" 4
+.IP \fBOSSL_PARAM_OCTET_PTR\fR 4
.IX Item "OSSL_PARAM_OCTET_PTR"
The parameter data is a pointer to an arbitrary string of bytes.
.Sp
-The difference between this and \fB\s-1OSSL_PARAM_OCTET_STRING\s0\fR is that
+The difference between this and \fBOSSL_PARAM_OCTET_STRING\fR is that
\&\fIdata\fR doesn't point directly at the data, but to a pointer that
points to the data.
.Sp
-If there is any uncertainty about which to use, \fB\s-1OSSL_PARAM_OCTET_STRING\s0\fR is
+If there is any uncertainty about which to use, \fBOSSL_PARAM_OCTET_STRING\fR is
almost certainly the correct choice.
.Sp
This is used to indicate that constant data is or will be passed, and
@@ -344,54 +268,54 @@ Note that the use of this type is \fBfragile\fR and can only be safely
used for data that remains constant and in a constant location for a
long enough duration (such as the life-time of the entity that
offers these parameters).
-.SH "NOTES"
+.SH NOTES
.IX Header "NOTES"
Both when setting and requesting parameters, the functions that are
called will have to decide what is and what is not an error.
The recommended behaviour is:
-.IP "\(bu" 4
+.IP \(bu 4
Keys that a \fIsetter\fR or \fIresponder\fR doesn't recognise should simply
be ignored.
That in itself isn't an error.
-.IP "\(bu" 4
+.IP \(bu 4
If the keys that a called \fIsetter\fR recognises form a consistent
enough set of data, that call should succeed.
-.IP "\(bu" 4
+.IP \(bu 4
Apart from the \fIreturn_size\fR, a \fIresponder\fR must never change the fields
-of an \fB\s-1OSSL_PARAM\s0\fR.
+of an \fBOSSL_PARAM\fR.
To return a value, it should change the contents of the memory that
\&\fIdata\fR points at.
-.IP "\(bu" 4
+.IP \(bu 4
If the data type for a key that it's associated with is incorrect,
the called function may return an error.
.Sp
The called function may also try to convert the data to a suitable
form (for example, it's plausible to pass a large number as an octet
string, so even though a given key is defined as an
-\&\fB\s-1OSSL_PARAM_UNSIGNED_INTEGER\s0\fR, is plausible to pass the value as an
-\&\fB\s-1OSSL_PARAM_OCTET_STRING\s0\fR), but this is in no way mandatory.
-.IP "\(bu" 4
-If \fIdata\fR for a \fB\s-1OSSL_PARAM_OCTET_STRING\s0\fR or a
-\&\fB\s-1OSSL_PARAM_UTF8_STRING\s0\fR is \s-1NULL,\s0 the \fIresponder\fR should
+\&\fBOSSL_PARAM_UNSIGNED_INTEGER\fR, is plausible to pass the value as an
+\&\fBOSSL_PARAM_OCTET_STRING\fR), but this is in no way mandatory.
+.IP \(bu 4
+If \fIdata\fR for a \fBOSSL_PARAM_OCTET_STRING\fR or a
+\&\fBOSSL_PARAM_UTF8_STRING\fR is NULL, the \fIresponder\fR should
set \fIreturn_size\fR to the size of the item to be returned
and return success. Later the responder will be called again
with \fIdata\fR pointing at the place for the value to be put.
-.IP "\(bu" 4
+.IP \(bu 4
If a \fIresponder\fR finds that some data sizes are too small for the
requested data, it must set \fIreturn_size\fR for each such
-\&\fB\s-1OSSL_PARAM\s0\fR item to the minimum required size, and eventually return
+\&\fBOSSL_PARAM\fR item to the minimum required size, and eventually return
an error.
-.IP "\(bu" 4
-For the integer type parameters (\fB\s-1OSSL_PARAM_UNSIGNED_INTEGER\s0\fR and
-\&\fB\s-1OSSL_PARAM_INTEGER\s0\fR), a \fIresponder\fR may choose to return an error
+.IP \(bu 4
+For the integer type parameters (\fBOSSL_PARAM_UNSIGNED_INTEGER\fR and
+\&\fBOSSL_PARAM_INTEGER\fR), a \fIresponder\fR may choose to return an error
if the \fIdata_size\fR isn't a suitable size (even if \fIdata_size\fR is
bigger than needed). If the \fIresponder\fR finds the size suitable, it
must fill all \fIdata_size\fR bytes and ensure correct padding for the
native endianness, and set \fIreturn_size\fR to the same value as
\&\fIdata_size\fR.
-.SH "EXAMPLES"
+.SH EXAMPLES
.IX Header "EXAMPLES"
-A couple of examples to just show how \fB\s-1OSSL_PARAM\s0\fR arrays could be
+A couple of examples to just show how \fBOSSL_PARAM\fR arrays could be
set up.
.PP
\fIExample 1\fR
@@ -450,15 +374,15 @@ could fill in the parameters like this:
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
-\&\fBopenssl\-core.h\fR\|(7), \fBOSSL_PARAM_get_int\fR\|(3), \fBOSSL_PARAM_dup\fR\|(3)
-.SH "HISTORY"
+\&\fBopenssl\-core.h\fR\|(7), \fBOSSL_PARAM_get_int\fR\|(3), \fBOSSL_PARAM_dup\fR\|(3), \fBOSSL_PARAM_construct_utf8_string\fR\|(3)
+.SH HISTORY
.IX Header "HISTORY"
-\&\fB\s-1OSSL_PARAM\s0\fR was added in OpenSSL 3.0.
-.SH "COPYRIGHT"
+\&\fBOSSL_PARAM\fR was added in OpenSSL 3.0.
+.SH COPYRIGHT
.IX Header "COPYRIGHT"
-Copyright 2019\-2023 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2019\-2025 The OpenSSL Project Authors. All Rights Reserved.
.PP
-Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
+Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
-in the file \s-1LICENSE\s0 in the source distribution or at
+in the file LICENSE in the source distribution or at
<https://www.openssl.org/source/license.html>.