diff options
author | David Howells <dhowells@redhat.com> | 2015-10-21 09:04:48 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-10-21 10:18:36 -0400 |
commit | 146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc (patch) | |
tree | a89ef2cd2e8029b0c09a58739cca0e7e2e68f4db /Documentation/crypto | |
parent | 4adc605edc5f744dcf432241b5996ff6a13d868c (diff) |
KEYS: Merge the type-specific data with the payload data
Merge the type-specific data with the payload data into one four-word chunk
as it seems pointless to keep them separate.
Use user_key_payload() for accessing the payloads of overloaded
user-defined keys.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-cifs@vger.kernel.org
cc: ecryptfs@vger.kernel.org
cc: linux-ext4@vger.kernel.org
cc: linux-f2fs-devel@lists.sourceforge.net
cc: linux-nfs@vger.kernel.org
cc: ceph-devel@vger.kernel.org
cc: linux-ima-devel@lists.sourceforge.net
Diffstat (limited to 'Documentation/crypto')
-rw-r--r-- | Documentation/crypto/asymmetric-keys.txt | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/Documentation/crypto/asymmetric-keys.txt b/Documentation/crypto/asymmetric-keys.txt index b7675904a747..8c07e0ea6bc0 100644 --- a/Documentation/crypto/asymmetric-keys.txt +++ b/Documentation/crypto/asymmetric-keys.txt | |||
@@ -186,7 +186,7 @@ and looks like the following: | |||
186 | const struct public_key_signature *sig); | 186 | const struct public_key_signature *sig); |
187 | }; | 187 | }; |
188 | 188 | ||
189 | Asymmetric keys point to this with their type_data[0] member. | 189 | Asymmetric keys point to this with their payload[asym_subtype] member. |
190 | 190 | ||
191 | The owner and name fields should be set to the owning module and the name of | 191 | The owner and name fields should be set to the owning module and the name of |
192 | the subtype. Currently, the name is only used for print statements. | 192 | the subtype. Currently, the name is only used for print statements. |
@@ -269,8 +269,7 @@ mandatory: | |||
269 | 269 | ||
270 | struct key_preparsed_payload { | 270 | struct key_preparsed_payload { |
271 | char *description; | 271 | char *description; |
272 | void *type_data[2]; | 272 | void *payload[4]; |
273 | void *payload; | ||
274 | const void *data; | 273 | const void *data; |
275 | size_t datalen; | 274 | size_t datalen; |
276 | size_t quotalen; | 275 | size_t quotalen; |
@@ -283,16 +282,18 @@ mandatory: | |||
283 | not theirs. | 282 | not theirs. |
284 | 283 | ||
285 | If the parser is happy with the blob, it should propose a description for | 284 | If the parser is happy with the blob, it should propose a description for |
286 | the key and attach it to ->description, ->type_data[0] should be set to | 285 | the key and attach it to ->description, ->payload[asym_subtype] should be |
287 | point to the subtype to be used, ->payload should be set to point to the | 286 | set to point to the subtype to be used, ->payload[asym_crypto] should be |
288 | initialised data for that subtype, ->type_data[1] should point to a hex | 287 | set to point to the initialised data for that subtype, |
289 | fingerprint and quotalen should be updated to indicate how much quota this | 288 | ->payload[asym_key_ids] should point to one or more hex fingerprints and |
290 | key should account for. | 289 | quotalen should be updated to indicate how much quota this key should |
291 | 290 | account for. | |
292 | When clearing up, the data attached to ->type_data[1] and ->description | 291 | |
293 | will be kfree()'d and the data attached to ->payload will be passed to the | 292 | When clearing up, the data attached to ->payload[asym_key_ids] and |
294 | subtype's ->destroy() method to be disposed of. A module reference for | 293 | ->description will be kfree()'d and the data attached to |
295 | the subtype pointed to by ->type_data[0] will be put. | 294 | ->payload[asm_crypto] will be passed to the subtype's ->destroy() method |
295 | to be disposed of. A module reference for the subtype pointed to by | ||
296 | ->payload[asym_subtype] will be put. | ||
296 | 297 | ||
297 | 298 | ||
298 | If the data format is not recognised, -EBADMSG should be returned. If it | 299 | If the data format is not recognised, -EBADMSG should be returned. If it |