Debian Codegraph @

upstream/debian-unstable/man7/property.7ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "PROPERTY 7SSL"
58 .TH PROPERTY 7SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 property \- Properties, a selection mechanism for algorithm implementations
65 .SH DESCRIPTION
66 .IX Header "DESCRIPTION"
67 As of OpenSSL 3.0, a new method has been introduced to decide which of
68 multiple implementations of an algorithm will be used.
69 The method is centered around the concept of properties.
70 Each implementation defines a number of properties and when an algorithm
71 is being selected, filters based on these properties can be used to
72 choose the most appropriate implementation of the algorithm.
73 .PP
74 Properties are like variables, they are referenced by name and have a value
75 assigned.
76 .SS "Property Names"
77 .IX Subsection "Property Names"
78 Property names fall into two categories: those reserved by the OpenSSL
79 project and user defined names.
80 A \fIreserved\fR property name consists of a single C\-style identifier
81 (except for leading underscores not being permitted), which begins
82 with a letter and can be followed by any number of letters, numbers
83 and underscores.
84 Property names are case-insensitive, but OpenSSL will only use lowercase
85 letters.
86 .PP
87 A \fIuser defined\fR property name is similar, but it \fBmust\fR consist of
88 two or more C\-style identifiers, separated by periods.
89 The last identifier in the name can be considered the 'true' property
90 name, which is prefixed by some sort of 'namespace'.
91 Providers for example could include their name in the prefix and use
92 property names like
93 .PP
94 .Vb 2
95 \& <provider_name>.<property_name>
96 \& <provider_name>.<algorithm_name>.<property_name>
97 .Ve
98 .SS Properties
99 .IX Subsection "Properties"
100 A \fIproperty\fR is a \fIname=value\fR pair.
101 A \fIproperty definition\fR is a sequence of comma separated properties.
102 There can be any number of properties in a definition, however each name must
103 be unique.
104 For example: "" defines an empty property definition (i.e., no restriction);
105 "my.foo=bar" defines a property named \fImy.foo\fR which has a string value \fIbar\fR
106 and "iteration.count=3" defines a property named \fIiteration.count\fR which
107 has a numeric value of \fI3\fR.
108 The full syntax for property definitions appears below.
109 .SS Implementations
110 .IX Subsection "Implementations"
111 Each implementation of an algorithm can define any number of
112 properties.
113 For example, the default provider defines the property \fIprovider=default\fR
114 for all of its algorithms.
115 Likewise, OpenSSL's FIPS provider defines \fIprovider=fips\fR and the legacy
116 provider defines \fIprovider=legacy\fR for all of their algorithms.
117 .SS Queries
118 .IX Subsection "Queries"
119 A \fIproperty query clause\fR is a single conditional test.
120 For example, "fips=yes", "provider!=default" or "?iteration.count=3".
121 The first two represent mandatory clauses, such clauses \fBmust\fR match
122 for any algorithm to even be under consideration.
123 The third clause represents an optional clause.
124 Matching such clauses is not a requirement, but any additional optional
125 match counts in favor of the algorithm.
126 More details about that in the \fBLookups\fR section.
127 A \fIproperty query\fR is a sequence of comma separated property query clauses.
128 It is an error if a property name appears in more than one query clause.
129 The full syntax for property queries appears below, but the available syntactic
130 features are:
131 .IP \(bu 4
132 \&\fB=\fR is an infix operator providing an equality test.
133 .IP \(bu 4
134 \&\fB!=\fR is an infix operator providing an inequality test.
135 .IP \(bu 4
136 \&\fB?\fR is a prefix operator that means that the following clause is optional
137 but preferred.
138 .IP \(bu 4
139 \&\fB\-\fR is a prefix operator that means any global query clause involving the
140 following property name should be ignored.
141 .IP \(bu 4
142 \&\fB"..."\fR is a quoted string.
143 The quotes are not included in the body of the string.
144 .IP \(bu 4
145 \&\fB'...'\fR is a quoted string.
146 The quotes are not included in the body of the string.
147 .SS Lookups
148 .IX Subsection "Lookups"
149 When an algorithm is looked up, a property query is used to determine
150 the best matching algorithm.
151 All mandatory query clauses \fBmust\fR be present and the implementation
152 that additionally has the largest number of matching optional query
153 clauses will be used.
154 If there is more than one such optimal candidate, the result will be
155 chosen from amongst those in an indeterminate way.
156 Ordering of optional clauses is not significant.
157 .SS Shortcut
158 .IX Subsection "Shortcut"
159 In order to permit a more concise expression of boolean properties, there
160 is one short cut: a property name alone (e.g. "my.property") is
161 exactly equivalent to "my.property=yes" in both definitions and queries.
162 .SS "Global and Local"
163 .IX Subsection "Global and Local"
164 Two levels of property query are supported.
165 A context based property query that applies to all fetch operations and a local
166 property query.
167 Where both the context and local queries include a clause with the same name,
168 the local clause overrides the context clause.
169 .PP
170 It is possible for a local property query to remove a clause in the context
171 property query by preceding the property name with a '\-'.
172 For example, a context property query that contains "fips=yes" would normally
173 result in implementations that have "fips=yes".
174 .PP
175 However, if the setting of the "fips" property is irrelevant to the
176 operations being performed, the local property query can include the
177 clause "\-fips".
178 Note that the local property query could not use "fips=no" because that would
179 disallow any implementations with "fips=yes" rather than not caring about the
180 setting.
181 .SH "PREDEFINED NAMES"
182 .IX Header "PREDEFINED NAMES"
183 Currently known predefined names are:
184 .ie n .IP """provider""" 4
185 .el .IP \f(CWprovider\fR 4
186 .IX Item "provider"
187 The conventional property value is the provider's name. This may be different from the name returned by \fBOSSL_PROVIDER_get0_name\fR\|(3).
188 .Sp
189 It is a convention among OpenSSL provider implementations to define a property with this name. It is not mandatory to do this.
190 .ie n .IP """version""" 4
191 .el .IP \f(CWversion\fR 4
192 .IX Item "version"
193 The conventional property value is the provider's version.
194 .Sp
195 OpenSSL provider implementations do not define a property with this name.
196 .ie n .IP """fips""" 4
197 .el .IP \f(CWfips\fR 4
198 .IX Item "fips"
199 The conventional property value is boolean (\f(CW"yes"\fR or \f(CW"no"\fR), indication whether the implementation conforms to FIPS standards or not.
200 .Sp
201 It is a convention among OpenSSL provider implementations to define a property with this name where applicable. It is not mandatory to do this, but is strongly recommended.
202 .ie n .IP """output"", ""input"", ""structure""" 4
203 .el .IP "\f(CWoutput\fR, \f(CWinput\fR, \f(CWstructure\fR" 4
204 .IX Item "output, input, structure"
205 Properties with these names are used by encoders (see \fBprovider\-encoder\fR\|(7)) and decoders (see \fBprovider\-decoder\fR\|(7)).
206 .SH SYNTAX
207 .IX Header "SYNTAX"
208 The lexical syntax in EBNF is given by:
209 .PP
210 .Vb 11
211 \& Definition ::= PropertyName ( \*(Aq=\*(Aq Value )?
212 \& ( \*(Aq,\*(Aq PropertyName ( \*(Aq=\*(Aq Value )? )*
213 \& Query ::= PropertyQuery ( \*(Aq,\*(Aq PropertyQuery )*
214 \& PropertyQuery ::= \*(Aq\-\*(Aq PropertyName
215 \& | \*(Aq?\*(Aq? ( PropertyName (( \*(Aq=\*(Aq | \*(Aq!=\*(Aq ) Value)?)
216 \& Value ::= NumberLiteral | StringLiteral
217 \& StringLiteral ::= QuotedString | UnquotedString
218 \& QuotedString ::= \*(Aq"\*(Aq [^"]* \*(Aq"\*(Aq | "\*(Aq" [^\*(Aq]* "\*(Aq"
219 \& UnquotedString ::= [A\-Za\-z] [^{space},]+
220 \& NumberLiteral ::= \*(Aq0\*(Aq ( [0\-7]* | \*(Aqx\*(Aq [0\-9A\-Fa\-f]+ ) | \*(Aq\-\*(Aq? [1\-9] [0\-9]+
221 \& PropertyName ::= [A\-Za\-z] [A\-Za\-z0\-9_]* ( \*(Aq.\*(Aq [A\-Za\-z] [A\-Za\-z0\-9_]* )*
222 .Ve
223 .PP
224 The flavour of EBNF being used is defined by:
225 <https://www.w3.org/TR/2010/REC\-xquery\-20101214/#EBNFNotation>.
226 .SH HISTORY
227 .IX Header "HISTORY"
228 Properties were added in OpenSSL 3.0
229 .SH COPYRIGHT
230 .IX Header "COPYRIGHT"
231 Copyright 2019\-2026 The OpenSSL Project Authors. All Rights Reserved.
232 .PP
233 Licensed under the Apache License 2.0 (the "License"). You may not use
234 this file except in compliance with the License. You can obtain a copy
235 in the file LICENSE in the source distribution or at
236 <https://www.openssl.org/source/license.html>.