@@ -91,88 +91,3 @@ Error codes:
9191- ` WH_ERROR_BADARGS ` if parameters are invalid.
9292- ` WH_ERROR_NOTFOUND ` if the key is missing.
9393- Propagates NVM/storage errors (for example ` WH_ERROR_NOSPACE ` ).
94-
95- ## NVM Access and Flag Controls
96-
97- ### whNvmFlags
98-
99- Policy flags for NVM objects and keys.
100-
101- Flags include ` WH_NVM_FLAGS_NONMODIFIABLE ` , ` WH_NVM_FLAGS_NONDESTROYABLE ` ,
102- ` WH_NVM_FLAGS_NONEXPORTABLE ` , and the usage policy flags ` WH_NVM_FLAGS_USAGE_* ` .
103- If no usage flags are set, the key is not permitted for cryptographic use.
104-
105- ### wh_Nvm_AddObjectChecked
106-
107- Add an NVM object with policy enforcement.
108-
109- This function applies NVM policy checks (for example non-modifiable objects)
110- before writing the object.
111-
112- Parameters:
113-
114- - ` context ` : NVM context.
115- - ` meta ` : Metadata describing the object.
116- - ` data_len ` : Length of object data.
117- - ` data ` : Object data buffer.
118-
119- Return values:
120-
121- - ` WH_ERROR_OK ` on success.
122- - A negative error code on failure.
123-
124- Error codes:
125-
126- - ` WH_ERROR_BADARGS ` if parameters are invalid.
127- - ` WH_ERROR_ACCESS ` if the object is non-modifiable.
128- - Propagates backend errors (for example ` WH_ERROR_NOSPACE ` ).
129-
130- ### wh_Nvm_ReadChecked
131-
132- Read an NVM object with policy enforcement.
133-
134- This function applies NVM policy checks (for example non-exportable objects)
135- before reading the object data.
136-
137- Parameters:
138-
139- - ` context ` : NVM context.
140- - ` id ` : Object ID to read.
141- - ` offset ` : Byte offset into the object.
142- - ` data_len ` : Length of data to read.
143- - ` data ` : Output buffer.
144-
145- Return values:
146-
147- - ` WH_ERROR_OK ` on success.
148- - A negative error code on failure.
149-
150- Error codes:
151-
152- - ` WH_ERROR_BADARGS ` if parameters are invalid.
153- - ` WH_ERROR_ACCESS ` if the object is non-exportable.
154- - ` WH_ERROR_NOTFOUND ` if the object does not exist.
155-
156- ### wh_Nvm_DestroyObjectsChecked
157-
158- Destroy NVM objects with policy enforcement.
159-
160- This function applies NVM policy checks (for example non-destroyable objects)
161- before erasing the objects.
162-
163- Parameters:
164-
165- - ` context ` : NVM context.
166- - ` list_count ` : Number of IDs in the list.
167- - ` id_list ` : Array of object IDs to destroy.
168-
169- Return values:
170-
171- - ` WH_ERROR_OK ` on success.
172- - A negative error code on failure.
173-
174- Error codes:
175-
176- - ` WH_ERROR_BADARGS ` if parameters are invalid.
177- - ` WH_ERROR_ACCESS ` if any object is non-destroyable or non-modifiable.
178- - ` WH_ERROR_NOTFOUND ` if a listed object is missing.
0 commit comments