aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-19 23:53:02 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-20 17:59:02 +0200
commita57d476abbe857365aff157f389cc1188b5dd090 (patch)
treee8f7163ef7e6f5426748fed8d2eaa5183038a5d6 /src/reclaim/oidc_helper.c
parente75869506cc08e08056168383bd4ab02e1f007de (diff)
downloadgnunet-a57d476abbe857365aff157f389cc1188b5dd090.tar.gz
gnunet-a57d476abbe857365aff157f389cc1188b5dd090.zip
reclaim: Attestations now called credentials. Credentials are presented to third parties as presentations.
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r--src/reclaim/oidc_helper.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index 9c7e79c41..b307a358c 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -156,8 +156,8 @@ fix_base64 (char *str)
156 156
157static json_t* 157static json_t*
158generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 158generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
159 struct GNUNET_RECLAIM_AttributeList *attrs, 159 const struct GNUNET_RECLAIM_AttributeList *attrs,
160 struct GNUNET_RECLAIM_PresentationList *presentations) 160 const struct GNUNET_RECLAIM_PresentationList *presentations)
161{ 161{
162 struct GNUNET_RECLAIM_AttributeListEntry *le; 162 struct GNUNET_RECLAIM_AttributeListEntry *le;
163 struct GNUNET_RECLAIM_PresentationListEntry *ple; 163 struct GNUNET_RECLAIM_PresentationListEntry *ple;
@@ -296,8 +296,8 @@ generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
296 */ 296 */
297char * 297char *
298OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 298OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
299 struct GNUNET_RECLAIM_AttributeList *attrs, 299 const struct GNUNET_RECLAIM_AttributeList *attrs,
300 struct GNUNET_RECLAIM_PresentationList *presentations) 300 const struct GNUNET_RECLAIM_PresentationList *presentations)
301{ 301{
302 char *body_str; 302 char *body_str;
303 json_t* body = generate_userinfo_json (sub_key, 303 json_t* body = generate_userinfo_json (sub_key,
@@ -323,8 +323,8 @@ OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
323char * 323char *
324OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, 324OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
325 const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 325 const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
326 struct GNUNET_RECLAIM_AttributeList *attrs, 326 const struct GNUNET_RECLAIM_AttributeList *attrs,
327 struct GNUNET_RECLAIM_PresentationList *presentations, 327 const struct GNUNET_RECLAIM_PresentationList *presentations,
328 const struct GNUNET_TIME_Relative *expiration_time, 328 const struct GNUNET_TIME_Relative *expiration_time,
329 const char *nonce, 329 const char *nonce,
330 const char *secret_key) 330 const char *secret_key)
@@ -440,8 +440,8 @@ OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
440char * 440char *
441OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, 441OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
442 const struct GNUNET_RECLAIM_Ticket *ticket, 442 const struct GNUNET_RECLAIM_Ticket *ticket,
443 struct GNUNET_RECLAIM_AttributeList *attrs, 443 const struct GNUNET_RECLAIM_AttributeList *attrs,
444 struct GNUNET_RECLAIM_PresentationList *presentations, 444 const struct GNUNET_RECLAIM_PresentationList *presentations,
445 const char *nonce_str, 445 const char *nonce_str,
446 const char *code_challenge) 446 const char *code_challenge)
447{ 447{
@@ -596,7 +596,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
596 struct GNUNET_CRYPTO_EcdsaSignature *signature; 596 struct GNUNET_CRYPTO_EcdsaSignature *signature;
597 uint32_t code_challenge_len; 597 uint32_t code_challenge_len;
598 uint32_t attrs_ser_len; 598 uint32_t attrs_ser_len;
599 uint32_t presentations_ser_len; 599 uint32_t pres_ser_len;
600 size_t plaintext_len; 600 size_t plaintext_len;
601 size_t code_payload_len; 601 size_t code_payload_len;
602 uint32_t nonce_len = 0; 602 uint32_t nonce_len = 0;
@@ -702,8 +702,8 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
702 presentations_ser = ((char*) attrs_ser) + attrs_ser_len; 702 presentations_ser = ((char*) attrs_ser) + attrs_ser_len;
703 pres_ser_len = ntohl (params->pres_list_len); 703 pres_ser_len = ntohl (params->pres_list_len);
704 *presentations = 704 *presentations =
705 GNUNET_RECLAIM_presentations_list_deserialize (presentations_ser, 705 GNUNET_RECLAIM_presentation_list_deserialize (presentations_ser,
706 pres_ser_len); 706 pres_ser_len);
707 707
708 GNUNET_free (code_payload); 708 GNUNET_free (code_payload);
709 return GNUNET_OK; 709 return GNUNET_OK;