mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 15:25:27 +00:00
Make entry points mandatory in capabilities
Inferring entry points from algorithms is nice in that it makes capability specifications shorter and less redundant, but that's not really important. It also makes capabilities more fragile: if the core starts supporting new mechanisms based on the same algorithm (for example, adding hash-and-sign when only sign-the-hash existed before), a driver only supporting the old mechanisms would fail at build time. So make entry points mandatory. This has the benefit of making the semantics of capabilities easier to describe. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
924e273b06
commit
1bc9c4c8c8
|
@ -83,7 +83,7 @@ A capability declares a family of functions that the driver implements for a cer
|
||||||
|
|
||||||
A capability is a JSON object containing the following properties:
|
A capability is a JSON object containing the following properties:
|
||||||
|
|
||||||
* `"entry_points"` (optional, list of strings). Each element is the name of a [driver entry point](#driver-entry-point) or driver entry point family. An entry point is a function defined by the driver. If specified, the core will invoke this capability of the driver only when performing one of the specified operations. If omitted, the `"algorithms"` property is mandatory and the core will invoke this capability of the driver for all operations that are applicable to the specified algorithms. The driver must implement all the specified or implied entry points, as well as the types if applicable.
|
* `"entry_points"` (mandatory, list of strings). Each element is the name of a [driver entry point](#driver-entry-point) or driver entry point family. An entry point is a function defined by the driver. If specified, the core will invoke this capability of the driver only when performing one of the specified operations. The driver must implement all the specified entry points, as well as the types if applicable.
|
||||||
* `"algorithms"` (optional, list of strings). Each element is an [algorithm specification](#algorithm-specifications). If specified, the core will invoke this capability of the driver only when performing one of the specified algorithms. If omitted, the core will invoke this capability for all applicable algorithms.
|
* `"algorithms"` (optional, list of strings). Each element is an [algorithm specification](#algorithm-specifications). If specified, the core will invoke this capability of the driver only when performing one of the specified algorithms. If omitted, the core will invoke this capability for all applicable algorithms.
|
||||||
* `"key_types"` (optional, list of strings). Each element is a [key type specification](#key-type-specifications). If specified, the core will invoke this capability of the driver only for operations involving a key with one of the specified key types. If omitted, the core will invoke this capability of the driver for all applicable key types.
|
* `"key_types"` (optional, list of strings). Each element is a [key type specification](#key-type-specifications). If specified, the core will invoke this capability of the driver only for operations involving a key with one of the specified key types. If omitted, the core will invoke this capability of the driver for all applicable key types.
|
||||||
* `"key_sizes"` (optional, list of integers). If specified, the core will invoke this capability of the driver only for operations involving a key with one of the specified key sizes. If omitted, the core will invoke this capability of the driver for all applicable key sizes. Key sizes are expressed in bits.
|
* `"key_sizes"` (optional, list of integers). If specified, the core will invoke this capability of the driver only for operations involving a key with one of the specified key sizes. If omitted, the core will invoke this capability of the driver for all applicable key sizes. Key sizes are expressed in bits.
|
||||||
|
|
Loading…
Reference in a new issue