From: Schanzenbach, Martin Date: Wed, 29 Mar 2017 12:26:33 +0000 (+0200) Subject: - merge with master X-Git-Tag: gnunet-0.11.0rc0~24^2~93 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ab281595eeb270120f89ec954a572f4fcf78fc53;p=oweals%2Fgnunet.git - merge with master --- ab281595eeb270120f89ec954a572f4fcf78fc53 diff --cc src/identity-provider/plugin_rest_identity_provider.c index cd0c76989,907b28ba9..5ea7b2821 --- a/src/identity-provider/plugin_rest_identity_provider.c +++ b/src/identity-provider/plugin_rest_identity_provider.c @@@ -602,9 -580,10 +602,10 @@@ issue_token_cont (struct GNUNET_REST_Re } nonce_str = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, &key); + GNUNET_assert (NULL != nonce_str); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Request nonce: %s\n", - nonce_str); + "Request nonce: %s\n", + nonce_str); GNUNET_assert (1 == sscanf (nonce_str, "%"SCNu64, &nonce)); //Get expiration for token from URL parameter @@@ -888,7 -867,8 +890,8 @@@ exchange_cont (void *cls return; } nonce_str = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, - &key); + &key); + GNUNET_assert (NULL != nonce_str); GNUNET_assert (1 == sscanf (nonce_str, "%"SCNu64, &expected_nonce)); if (ticket_nonce != expected_nonce) diff --cc src/include/gnunet_credential_service.h index d04c0a253,9e765c12b..6c9b477ea --- a/src/include/gnunet_credential_service.h +++ b/src/include/gnunet_credential_service.h @@@ -227,56 -75,26 +227,54 @@@ GNUNET_CREDENTIAL_disconnect (struct GN /** - * Iterator called on obtained result for a Credential lookup. + * Iterator called on obtained result for an attribute verification. * * @param cls closure - * @param issuer the issuer chain - * @param issuer_len length of issuer chain - * @param value the value returned + * @param d_count the number of delegations processed + * @param delegation_chain the delegations processed + * @param c_count the number of credentials found + * @param credential the credentials */ -typedef void -(*GNUNET_CREDENTIAL_LookupResultProcessor) (void *cls, - struct GNUNET_IDENTITY_Ego *issuer, - uint16_t issuer_len, - const struct GNUNET_CREDENTIAL_Value *value); +typedef void (*GNUNET_CREDENTIAL_CredentialResultProcessor) (void *cls, + unsigned int d_count, + struct GNUNET_CREDENTIAL_Delegation *delegation_chain, + unsigned int c_count, + struct GNUNET_CREDENTIAL_Credential *credential); +/** + * Iterator called on obtained result for an attribute delegation. + * + * @param cls closure + * @param success GNUNET_YES if successful + * @param result the record data that can be handed to the subject + */ +typedef void (*GNUNET_CREDENTIAL_DelegateResultProcessor) (void *cls, + uint32_t success); /** - * Perform an asynchronous lookup operation for a credential. + * Iterator called on obtained result for an attribute delegation removal. + * + * @param cls closure + * @param success GNUNET_YES if successful + * @param result the record data that can be handed to the subject + */ +typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls, + uint32_t success); + + - - +/** + * Performs attribute verification. + * Checks if there is a delegation chain from + * attribute ``issuer_attribute'' issued by the issuer + * with public key ``issuer_key'' maps to the attribute + * ``subject_attribute'' claimed by the subject with key + * ``subject_key'' * * @param handle handle to the Credential service - * @param credential the credential to look up - * @param subject Ego to check the credential for + * @param issuer_key the issuer public key + * @param issuer_attribute the issuer attribute + * @param subject_key the subject public key + * @param subject_attribute the attribute claimed by the subject * @param proc function to call on result * @param proc_cls closure for processor * @return handle to the queued request