diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-15 09:09:23 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-15 12:11:22 +0200 |
commit | 5680378974db794d67b75473435a0651fad0cd24 (patch) | |
tree | 06e1426049f9604114f9328554dc324b422052f4 /src/reclaim/oidc_helper.c | |
parent | 7b992510c25c0081c59c4b1f61fe42ff5dc7680d (diff) | |
download | gnunet-5680378974db794d67b75473435a0651fad0cd24.tar.gz gnunet-5680378974db794d67b75473435a0651fad0cd24.zip |
- towards fix reclaim
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r-- | src/reclaim/oidc_helper.c | 22 |
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 | ||
157 | static json_t* | 157 | static json_t* |
158 | generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, | 158 | generate_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 | */ |
297 | char * | 297 | char * |
298 | OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, | 298 | OIDC_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 | */ |
323 | char * | 323 | char * |
324 | OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | 324 | OIDC_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 | */ |
440 | char * | 440 | char * |
441 | OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, | 441 | OIDC_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 | */ |
578 | int | 578 | int |
579 | OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, | 579 | OIDC_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) |