aboutsummaryrefslogtreecommitdiff
path: root/src/credential/credential.h
diff options
context:
space:
mode:
authorAndreas Ebner <pansy007@googlemail.com>2019-07-09 17:53:33 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-07 12:15:06 +0200
commit5091edcec16455febee99afec20e0ffe6cc59c21 (patch)
treec7d517e26ca7d3d4f863b4154361293bc79d733e /src/credential/credential.h
parentfc58d9d4241ed2dcd4b492b4f922ba959449a697 (diff)
downloadgnunet-5091edcec16455febee99afec20e0ffe6cc59c21.tar.gz
gnunet-5091edcec16455febee99afec20e0ffe6cc59c21.zip
Cleanup, additional input checks, renaming, simplification:
- introducing own GNUNET_SIGNATURE_PURPOSE_DELEGATE - renaming of cred/crd in delegation_misc.c - renamed extension cmd para to import - changed subject key/attr parsing from memcpy/malloc to strtok - only allow to create delegates to expire absolute not relative (prevent reusing created delegation signatures) - check subject key and reuse expiration of import/signed delegation - replaced strdup() part of delegation_misc.c and credential_serialization.c with pointers - uncommented return after detection of unverifyable signatures
Diffstat (limited to 'src/credential/credential.h')
-rw-r--r--src/credential/credential.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/credential/credential.h b/src/credential/credential.h
index 3d76bbf4f..9de137275 100644
--- a/src/credential/credential.h
+++ b/src/credential/credential.h
@@ -210,6 +210,49 @@ struct CredentialEntry
210 */ 210 */
211}; 211};
212 212
213struct DelegateEntry
214{
215
216 /**
217 * The signature for this credential by the issuer
218 */
219 struct GNUNET_CRYPTO_EcdsaSignature signature;
220
221 /**
222 * Signature meta
223 */
224 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
225
226 /**
227 * Public key of the issuer
228 */
229 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
230
231 /**
232 * Public key of the subject this credential was issued to
233 */
234 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
235
236 /**
237 * Expiration time of this credential
238 */
239 uint64_t expiration GNUNET_PACKED;
240
241 /**
242 * Issuer subject attribute length
243 */
244 uint32_t issuer_attribute_len;
245
246 /**
247 * Issuer attribute length
248 */
249 uint32_t subject_attribute_len;
250
251 /**
252 * Followed by the subject attribute string
253 */
254};
255
213 256
214GNUNET_NETWORK_STRUCT_END 257GNUNET_NETWORK_STRUCT_END
215 258