xref: /freebsd/secure/lib/libcrypto/man/man7/property.7 (revision 069ac18495ad8fde2748bc94b0f80a50250bb01d)
Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)

Standard preamble:
========================================================================
..
..
.. 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 -- \(*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\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . 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 . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . 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 .\} ========================================================================

Title "PROPERTY 7ossl"
PROPERTY 7ossl "2023-09-19" "3.0.11" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
property - Properties, a selection mechanism for algorithm implementations
"DESCRIPTION"
Header "DESCRIPTION" As of OpenSSL 3.0, a new method has been introduced to decide which of multiple implementations of an algorithm will be used. The method is centered around the concept of properties. Each implementation defines a number of properties and when an algorithm is being selected, filters based on these properties can be used to choose the most appropriate implementation of the algorithm.

Properties are like variables, they are referenced by name and have a value assigned.

"Property Names"
Subsection "Property Names" Property names fall into two categories: those reserved by the OpenSSL project and user defined names. A reserved property name consists of a single C-style identifier (except for leading underscores not being permitted), which begins with a letter and can be followed by any number of letters, numbers and underscores. Property names are case-insensitive, but OpenSSL will only use lowercase letters.

A user defined property name is similar, but it must consist of two or more C-style identifiers, separated by periods. The last identifier in the name can be considered the 'true' property name, which is prefixed by some sort of 'namespace'. Providers for example could include their name in the prefix and use property names like

.Vb 2 <provider_name>.<property_name> <provider_name>.<algorithm_name>.<property_name> .Ve

"Properties"
Subsection "Properties" A property is a name=value pair. A property definition is a sequence of comma separated properties. There can be any number of properties in a definition, however each name must be unique. For example: "\*(L" defines an empty property definition (i.e., no restriction); \*(R"my.foo=bar" defines a property named my.foo which has a string value bar and \*(L"iteration.count=3\*(R" defines a property named iteration.count which has a numeric value of 3. The full syntax for property definitions appears below.
"Implementations"
Subsection "Implementations" Each implementation of an algorithm can define any number of properties. For example, the default provider defines the property provider=default for all of its algorithms. Likewise, OpenSSL's \s-1FIPS\s0 provider defines provider=fips and the legacy provider defines provider=legacy for all of their algorithms.
"Queries"
Subsection "Queries" A property query clause is a single conditional test. For example, \*(L"fips=yes\*(R", \*(L"provider!=default\*(R" or \*(L"?iteration.count=3\*(R". The first two represent mandatory clauses, such clauses must match for any algorithm to even be under consideration. The third clause represents an optional clause. Matching such clauses is not a requirement, but any additional optional match counts in favor of the algorithm. More details about that in the Lookups section. A property query is a sequence of comma separated property query clauses. It is an error if a property name appears in more than one query clause. The full syntax for property queries appears below, but the available syntactic features are:
"\(bu" 4
\fB= is an infix operator providing an equality test.
"\(bu" 4
\fB!= is an infix operator providing an inequality test.
"\(bu" 4
\fB? is a prefix operator that means that the following clause is optional but preferred.
"\(bu" 4
\fB- is a prefix operator that means any global query clause involving the following property name should be ignored.
"\(bu" 4
\fB\*(L"...\*(R" is a quoted string. The quotes are not included in the body of the string.
"\(bu" 4
\fB'...' is a quoted string. The quotes are not included in the body of the string.
"Lookups"
Subsection "Lookups" When an algorithm is looked up, a property query is used to determine the best matching algorithm. All mandatory query clauses must be present and the implementation that additionally has the largest number of matching optional query clauses will be used. If there is more than one such optimal candidate, the result will be chosen from amongst those in an indeterminate way. Ordering of optional clauses is not significant.
"Shortcut"
Subsection "Shortcut" In order to permit a more concise expression of boolean properties, there is one short cut: a property name alone (e.g. \*(L"my.property\*(R") is exactly equivalent to \*(L"my.property=yes\*(R" in both definitions and queries.
"Global and Local"
Subsection "Global and Local" Two levels of property query are supported. A context based property query that applies to all fetch operations and a local property query. Where both the context and local queries include a clause with the same name, the local clause overrides the context clause.

It is possible for a local property query to remove a clause in the context property query by preceding the property name with a '-'. For example, a context property query that contains \*(L"fips=yes\*(R" would normally result in implementations that have \*(L"fips=yes\*(R".

However, if the setting of the \*(L"fips\*(R" property is irrelevant to the operations being performed, the local property query can include the clause \*(L"-fips\*(R". Note that the local property query could not use \*(L"fips=no\*(R" because that would disallow any implementations with \*(L"fips=yes\*(R" rather than not caring about the setting.

"SYNTAX"
Header "SYNTAX" The lexical syntax in \s-1EBNF\s0 is given by:

.Vb 11 Definition ::= PropertyName ( \*(Aq=\*(Aq Value )? ( \*(Aq,\*(Aq PropertyName ( \*(Aq=\*(Aq Value )? )* Query ::= PropertyQuery ( \*(Aq,\*(Aq PropertyQuery )* PropertyQuery ::= \*(Aq-\*(Aq PropertyName | \*(Aq?\*(Aq? ( PropertyName (( \*(Aq=\*(Aq | \*(Aq!=\*(Aq ) Value)?) Value ::= NumberLiteral | StringLiteral StringLiteral ::= QuotedString | UnquotedString QuotedString ::= \*(Aq"\*(Aq [^"]* \*(Aq"\*(Aq | "\*(Aq" [^\*(Aq]* "\*(Aq" UnquotedString ::= [A-Za-z] [^{space},]+ NumberLiteral ::= \*(Aq0\*(Aq ( [0-7]* | \*(Aqx\*(Aq [0-9A-Fa-f]+ ) | \*(Aq-\*(Aq? [1-9] [0-9]+ PropertyName ::= [A-Za-z] [A-Za-z0-9_]* ( \*(Aq.\*(Aq [A-Za-z] [A-Za-z0-9_]* )* .Ve

The flavour of \s-1EBNF\s0 being used is defined by: <https://www.w3.org/TR/2010/REC-xquery-20101214/#EBNFNotation>.

"HISTORY"
Header "HISTORY" Properties were added in OpenSSL 3.0
"COPYRIGHT"
Header "COPYRIGHT" Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 <https://www.openssl.org/source/license.html>.