diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:43:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:43:34 +0200 |
commit | 90ff9edfa9c5fcfa3a36d1653ff105e89b888e21 (patch) | |
tree | 780a2071f5072c8e8e044db741eb295c3f3ea2a7 /src/reclaim/oidc_helper.c | |
parent | 3bcfe59f1ce533246bda271f00b3ee957cae304d (diff) | |
download | gnunet-90ff9edfa9c5fcfa3a36d1653ff105e89b888e21.tar.gz gnunet-90ff9edfa9c5fcfa3a36d1653ff105e89b888e21.zip |
fixing #6149
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r-- | src/reclaim/oidc_helper.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index dded06389..29e8cb2ef 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
@@ -449,7 +449,7 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, | |||
449 | uint32_t nonce; | 449 | uint32_t nonce; |
450 | uint32_t nonce_tmp; | 450 | uint32_t nonce_tmp; |
451 | struct GNUNET_CRYPTO_EccSignaturePurpose *purpose; | 451 | struct GNUNET_CRYPTO_EccSignaturePurpose *purpose; |
452 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdh_priv; | 452 | struct GNUNET_CRYPTO_EcdhePrivateKey ecdh_priv; |
453 | struct GNUNET_CRYPTO_EcdhePublicKey ecdh_pub; | 453 | struct GNUNET_CRYPTO_EcdhePublicKey ecdh_pub; |
454 | 454 | ||
455 | /** PLAINTEXT **/ | 455 | /** PLAINTEXT **/ |
@@ -531,8 +531,8 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, | |||
531 | code_payload_len); | 531 | code_payload_len); |
532 | 532 | ||
533 | // Generate ECDH key | 533 | // Generate ECDH key |
534 | ecdh_priv = GNUNET_CRYPTO_ecdhe_key_create (); | 534 | GNUNET_CRYPTO_ecdhe_key_create (&ecdh_priv); |
535 | GNUNET_CRYPTO_ecdhe_key_get_public (ecdh_priv, &ecdh_pub); | 535 | GNUNET_CRYPTO_ecdhe_key_get_public (&ecdh_priv, &ecdh_pub); |
536 | // Initialize code payload | 536 | // Initialize code payload |
537 | code_payload = GNUNET_malloc (code_payload_len); | 537 | code_payload = GNUNET_malloc (code_payload_len); |
538 | GNUNET_assert (NULL != code_payload); | 538 | GNUNET_assert (NULL != code_payload); |
@@ -545,8 +545,11 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, | |||
545 | memcpy (buf_ptr, &ecdh_pub, sizeof(ecdh_pub)); | 545 | memcpy (buf_ptr, &ecdh_pub, sizeof(ecdh_pub)); |
546 | buf_ptr += sizeof(ecdh_pub); | 546 | buf_ptr += sizeof(ecdh_pub); |
547 | // Encrypt plaintext and store | 547 | // Encrypt plaintext and store |
548 | encrypt_payload (&ticket->audience, ecdh_priv, payload, payload_len, buf_ptr); | 548 | encrypt_payload (&ticket->audience, |
549 | GNUNET_free (ecdh_priv); | 549 | &ecdh_priv, |
550 | payload, | ||
551 | payload_len, | ||
552 | buf_ptr); | ||
550 | GNUNET_free (payload); | 553 | GNUNET_free (payload); |
551 | buf_ptr += payload_len; | 554 | buf_ptr += payload_len; |
552 | // Sign and store signature | 555 | // Sign and store signature |