diff options
author | David Howells <dhowells@redhat.com> | 2014-07-18 13:56:34 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-07-22 16:46:08 -0400 |
commit | 7dfa0ca6a95de65b7a7760630cdbd7d30f204bfa (patch) | |
tree | e97786b11796e13f91b205dbb8adb3727e88789d /Documentation/security | |
parent | fc7c70e0b6b637bbf6cf8b9cee547d5ae83899c9 (diff) |
KEYS: Allow expiry time to be set when preparsing a key
Allow a key type's preparsing routine to set the expiry time for a key.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Acked-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'Documentation/security')
-rw-r--r-- | Documentation/security/keys.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index a4c33f1a7c6d..315cf96a41a2 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt | |||
@@ -1150,20 +1150,24 @@ The structure has a number of fields, some of which are mandatory: | |||
1150 | const void *data; | 1150 | const void *data; |
1151 | size_t datalen; | 1151 | size_t datalen; |
1152 | size_t quotalen; | 1152 | size_t quotalen; |
1153 | time_t expiry; | ||
1153 | }; | 1154 | }; |
1154 | 1155 | ||
1155 | Before calling the method, the caller will fill in data and datalen with | 1156 | Before calling the method, the caller will fill in data and datalen with |
1156 | the payload blob parameters; quotalen will be filled in with the default | 1157 | the payload blob parameters; quotalen will be filled in with the default |
1157 | quota size from the key type and the rest will be cleared. | 1158 | quota size from the key type; expiry will be set to TIME_T_MAX and the |
1159 | rest will be cleared. | ||
1158 | 1160 | ||
1159 | If a description can be proposed from the payload contents, that should be | 1161 | If a description can be proposed from the payload contents, that should be |
1160 | attached as a string to the description field. This will be used for the | 1162 | attached as a string to the description field. This will be used for the |
1161 | key description if the caller of add_key() passes NULL or "". | 1163 | key description if the caller of add_key() passes NULL or "". |
1162 | 1164 | ||
1163 | The method can attach anything it likes to type_data[] and payload. These | 1165 | The method can attach anything it likes to type_data[] and payload. These |
1164 | are merely passed along to the instantiate() or update() operations. | 1166 | are merely passed along to the instantiate() or update() operations. If |
1167 | set, the expiry time will be applied to the key if it is instantiated from | ||
1168 | this data. | ||
1165 | 1169 | ||
1166 | The method should return 0 if success ful or a negative error code | 1170 | The method should return 0 if successful or a negative error code |
1167 | otherwise. | 1171 | otherwise. |
1168 | 1172 | ||
1169 | 1173 | ||