aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.c
diff options
context:
space:
mode:
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 b307a358c..c3ff07976 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -155,7 +155,7 @@ fix_base64 (char *str)
155} 155}
156 156
157static json_t* 157static json_t*
158generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 158generate_userinfo_json(const struct GNUNET_IDENTITY_PublicKey *sub_key,
159 const struct GNUNET_RECLAIM_AttributeList *attrs, 159 const struct GNUNET_RECLAIM_AttributeList *attrs,
160 const struct GNUNET_RECLAIM_PresentationList *presentations) 160 const struct GNUNET_RECLAIM_PresentationList *presentations)
161{ 161{
@@ -180,7 +180,7 @@ generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
180 subject = 180 subject =
181 GNUNET_STRINGS_data_to_string_alloc (sub_key, 181 GNUNET_STRINGS_data_to_string_alloc (sub_key,
182 sizeof(struct 182 sizeof(struct
183 GNUNET_CRYPTO_EcdsaPublicKey)); 183 GNUNET_IDENTITY_PublicKey));
184 body = json_object (); 184 body = json_object ();
185 aggr_names = json_object (); 185 aggr_names = json_object ();
186 aggr_sources = json_object (); 186 aggr_sources = json_object ();
@@ -295,7 +295,7 @@ generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
295 * @return Userinfo JSON 295 * @return Userinfo JSON
296 */ 296 */
297char * 297char *
298OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 298OIDC_generate_userinfo (const struct GNUNET_IDENTITY_PublicKey *sub_key,
299 const struct GNUNET_RECLAIM_AttributeList *attrs, 299 const struct GNUNET_RECLAIM_AttributeList *attrs,
300 const struct GNUNET_RECLAIM_PresentationList *presentations) 300 const struct GNUNET_RECLAIM_PresentationList *presentations)
301{ 301{
@@ -321,8 +321,8 @@ OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
321 * @return a new base64-encoded JWT string. 321 * @return a new base64-encoded JWT string.
322 */ 322 */
323char * 323char *
324OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, 324OIDC_generate_id_token (const struct GNUNET_IDENTITY_PublicKey *aud_key,
325 const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 325 const struct GNUNET_IDENTITY_PublicKey *sub_key,
326 const struct GNUNET_RECLAIM_AttributeList *attrs, 326 const struct GNUNET_RECLAIM_AttributeList *attrs,
327 const 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,
@@ -356,11 +356,11 @@ OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
356 subject = 356 subject =
357 GNUNET_STRINGS_data_to_string_alloc (sub_key, 357 GNUNET_STRINGS_data_to_string_alloc (sub_key,
358 sizeof(struct 358 sizeof(struct
359 GNUNET_CRYPTO_EcdsaPublicKey)); 359 GNUNET_IDENTITY_PublicKey));
360 audience = 360 audience =
361 GNUNET_STRINGS_data_to_string_alloc (aud_key, 361 GNUNET_STRINGS_data_to_string_alloc (aud_key,
362 sizeof(struct 362 sizeof(struct
363 GNUNET_CRYPTO_EcdsaPublicKey)); 363 GNUNET_IDENTITY_PublicKey));
364 header = create_jwt_header (); 364 header = create_jwt_header ();
365 365
366 // aud REQUIRED public key client_id must be there 366 // aud REQUIRED public key client_id must be there
@@ -438,7 +438,7 @@ OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
438 * @return a new authorization code (caller must free) 438 * @return a new authorization code (caller must free)
439 */ 439 */
440char * 440char *
441OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, 441OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer,
442 const struct GNUNET_RECLAIM_Ticket *ticket, 442 const struct GNUNET_RECLAIM_Ticket *ticket,
443 const struct GNUNET_RECLAIM_AttributeList *attrs, 443 const struct GNUNET_RECLAIM_AttributeList *attrs,
444 const struct GNUNET_RECLAIM_PresentationList *presentations, 444 const struct GNUNET_RECLAIM_PresentationList *presentations,
@@ -544,7 +544,7 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
544 buf_ptr += payload_len; 544 buf_ptr += payload_len;
545 // Sign and store signature 545 // Sign and store signature
546 if (GNUNET_SYSERR == 546 if (GNUNET_SYSERR ==
547 GNUNET_CRYPTO_ecdsa_sign_ (issuer, 547 GNUNET_CRYPTO_ecdsa_sign_ (&issuer->ecdsa_key,
548 purpose, 548 purpose,
549 (struct GNUNET_CRYPTO_EcdsaSignature *) 549 (struct GNUNET_CRYPTO_EcdsaSignature *)
550 buf_ptr)) 550 buf_ptr))
@@ -576,7 +576,7 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
576 * @return GNUNET_OK if successful, else GNUNET_SYSERR 576 * @return GNUNET_OK if successful, else GNUNET_SYSERR
577 */ 577 */
578int 578int
579OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, 579OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *audience,
580 const char *code, 580 const char *code,
581 const char *code_verifier, 581 const char *code_verifier,
582 struct GNUNET_RECLAIM_Ticket *ticket, 582 struct GNUNET_RECLAIM_Ticket *ticket,
@@ -687,7 +687,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
687 GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN, 687 GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN,
688 purpose, 688 purpose,
689 signature, 689 signature,
690 &ticket->identity)) 690 &ticket->identity.ecdsa_key))
691 { 691 {
692 GNUNET_free (code_payload); 692 GNUNET_free (code_payload);
693 if (NULL != *nonce_str) 693 if (NULL != *nonce_str)