You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A positive number can be something else depending on context.
46
46
47
-
## Enums
47
+
## Enumerations
48
48
49
-
Enums take the format of `BSL_EnumName_e` (with a typedef).
49
+
Enumerations take the format of `BSL_EnumName_e` (with a typedef).
50
50
51
51
Variants of the enum should be "namespaced" with the enum, to manage clutter.
52
52
@@ -74,7 +74,7 @@ More notes forthcoming.
74
74
* A NULL pointer for almost any function argument is considered an anomaly and a programmer-error.
75
75
* Note the \@nullable doxygen command to indicate whenever a parameter _may_ be NULL.
76
76
* The public front-end API is more gracious to NULL arguments (returns error code). It is considered a runtime anomaly.
77
-
* Code further in the backend is more `assert`-ive of NULL checks. A NULL argument here is not a runtime anomaly, but rather an indication the programmer made a mistake.
77
+
* Code further in the backend performs more `assert` checking for NULL values. A NULL argument here is not a runtime anomaly, but rather an indication the programmer made a mistake.
78
78
* If you are not already familiar, see the ["Billion Dollar Mistake"](https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/).
79
79
*\*Note: The `GetBlockMetadata` function does permit NULL arguments, as it only populates arguments that are requested.
80
80
*\*Note: Certain functions that wrap OpenSSL functionality may also permit NULLs to be consistent with its interface.
@@ -104,7 +104,7 @@ More notes forthcoming.
104
104
* Third party libraries providing containers may be more hassle and risk than they are worth.
105
105
106
106
#### » M\*Lib structures should not be referenced in the Frontend API
107
-
* Keep M\*Lib usage to the BSL backend, and use standard/primative structs for frontend API. The frontend should not include any M\*Lib headers.
107
+
* Keep M\*Lib usage to the BSL backend, and use standard/primitive structs for frontend API. The frontend should not include any M\*Lib headers.
108
108
109
109
# Documentation
110
110
@@ -115,15 +115,14 @@ For reference, Doxygen comment blocks can contain complex markup based on a larg
115
115
116
116
When M*LIB macros are used to declare type-safe containers, the Doxygen inspection of the macro-expanded code should be inhibited but there should also be a explicit Doxygen block to provide explanation of the purpose of the struct and a reference to the type of its contents.
117
117
118
-
An example of this is below (corresponding to @refBSL_PolicyActionIList_t).
118
+
An example of this is below (corresponding to @refBSL_SecCtxDict_t).
119
119
120
120
@verbatim
121
-
/**@struct BSL_PolocuActionIList
122
-
* An [M-I-LIST](https://github.com/P-p-H-d/mlib/blob/master/README.md#m-i-list)
123
-
* of ::BSL_PolicyAction_t items.
121
+
/**@struct BSL_SecCtxDict_t
122
+
* Stable dict of security context descriptors (key: context id | value: descriptor struct)
@@ -188,7 +187,7 @@ Functions that can fail should have `int` return type and use the following comm
188
187
**Zero**: Means success (unless clearly indicated otherwise in exceptional use-cases)
189
188
**Positive**: Implies success, with some supplementary data. For example, a `_CreateBlock()` function, upon success, would return a positive integer containing the ID of the block just created.
190
189
191
-
NOTE!! This pattern is being adapted. A negative value indicates error, zero indicates succes.
190
+
NOTE!! This pattern is being adapted. A negative value indicates error, zero indicates success.
192
191
There may be times when there may be meaningful context associated with a positive value (e.g., number of bytes written).
193
192
194
193
# Structs and Functions
@@ -233,14 +232,14 @@ The precondition checks (on function parameters or on any other state generally)
233
232
-[CHKVOID(cond)](@ref CHKVOID) when the function has an `void` return type
234
233
-[CHKFALSE(cond)](@ref CHKFALSE) when the function has an `bool` return type
235
234
236
-
# Enums
235
+
# Enumerations
237
236
238
-
Enums with explicit values must be justified with citations, for example the declarations of @ref BSL_BundleBlockTypeCode_e.
237
+
Enumerations with explicit values must be justified with citations, for example the declarations of @ref BSL_BundleBlockTypeCode_e.
239
238
Otherwise, they should not be given values.
240
239
241
-
Whenever possible, enums starting with zero should be avoided (since many variables default to zero, we want to avoid the case of matching an enum variant with an uninitialized, zeroed-out, value)
240
+
Whenever possible, enum values starting with zero should be avoided (since many variables default to zero, we want to avoid the case of matching an enum variant with an uninitialized, zeroed-out, value)
242
241
243
-
Enums should be `typedef`-ed with a `_e` suffix.
242
+
Enumerations should be `typedef`-ed with a `_e` suffix.
244
243
Enum values should be full `SCREAMING_CASE` matching the name of the struct.
@@ -114,7 +114,7 @@ The BSL is regression-tested and targeted primarily toward a RHEL-9 platform on
114
114
115
115
The BSL defines a software interface written in C to maximize suitability for host applications regardless of their choice of programming language.
116
116
117
-
The BSL is expected to operate on a host with FIPS 140-mode enabled and SE Linux enforcing. Developers must test in this environment otherwise undefined behaviour may occur.
117
+
The BSL is expected to operate on a host with FIPS 140-mode enabled and SE Linux enforcing. Developers must test in this environment otherwise undefined behavior may occur.
118
118
119
119
120
120
## 2.2: Interface Medium and Characteristics
@@ -180,15 +180,15 @@ An example Policy Provider is included in the repository, as well as an implemen
180
180
Refer to the doxygen-generated documentation in the repository for the relevant BSL initialization functions, that provision the library with the appropriate policy provider and security context.
181
181
182
182
183
-
## 3.5: BSL Bundle Lifecycles and Workflos
183
+
## 3.5: BSL Bundle Lifecycles and Workflows
184
184
185
185
At each of the four points of contact between the BPA and BSL, the BPA invokes the BSL, which goes on to query the security policy provider, and returns an ordered list of security operations to be performed on the bundle according to local security policy.
186
186
187
187
The BPA then iterates through this list calling the relevant BSL functions to perform the given security operation. These operations are of two types. The first simply verifies a given security result indicating whether it is successful or a failure reason code, and does not manipulate the Bundle in any way. The second type, indicated by “finalize” in the relevant API function names, either apply a new security Block to the bundle, modify a Block in the bundle, or strip a security block from a Bundle (following its successful verification).
188
188
189
189
## 3.6: Software Dependencies
190
190
191
-
The BSL strives to avoid excessive reliance on third-party libraries and a long software supply chain. A few third-party libraries are required, however, to: provide dynamic data structures for this C codebase; provide a unit-test driver; provide a codec for CBOR-encoded Bundle blocks; and provide implementations of cryptographic algorithms. At the time of the Critical Design Review, these third-party open-source libraries respectively are MLib, Unity, QCBOR, and OpenSSL.
191
+
The BSL strives to avoid excessive reliance on third-party libraries and a long software supply chain. A few third-party libraries are required, however, to: provide dynamic data structures for this C codebase; provide a unit-test driver; provide a CODEC for CBOR-encoded Bundle blocks; and provide implementations of cryptographic algorithms. At the time of the Critical Design Review, these third-party open-source libraries respectively are MLib, Unity, QCBOR, and OpenSSL.
192
192
193
193
Note that specific library versions are detailed in Release Description Documents (RDD), which is produced with each release of BSL.
Copy file name to clipboardExpand all lines: docs/api/UserGuide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ digraph example {
59
59
}
60
60
@enddot
61
61
62
-
The BSL comes with a @ref frontend and a @ref backend_dyn implementation which uses heap-allocated, dynamially-sized data structures and run-time registration capabilities.
62
+
The BSL comes with a @ref frontend and a @ref backend_dyn implementation which uses heap-allocated, dynamically-sized data structures and run-time registration capabilities.
63
63
For a more constrained (_e.g._, flight software) environment an alternative backend could be implemented with fixed-size data containers and constant-time registry lookup algorithms.
64
64
65
65
Along with these libraries are also two integration extensions: an _Example Policy_ module and a _Default Security Contexts_ module.
0 commit comments