diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-08 16:56:33 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-08 16:56:33 +0200 |
commit | 11ae9f030e13d07c505a4d5477d592ddb4b3acf6 (patch) | |
tree | 69ce120a7c60c84d0d074bab8fe2cd26e77300dc /src/reclaim | |
parent | 2348fe4ae8ffe93765d5c56c3cc5d4490eae946d (diff) | |
download | gnunet-11ae9f030e13d07c505a4d5477d592ddb4b3acf6.tar.gz gnunet-11ae9f030e13d07c505a4d5477d592ddb4b3acf6.zip |
fix sign api for to address #6164
Diffstat (limited to 'src/reclaim')
-rw-r--r-- | src/reclaim/oidc_helper.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index 469b8a796..dded06389 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
@@ -551,10 +551,10 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, | |||
551 | buf_ptr += payload_len; | 551 | buf_ptr += payload_len; |
552 | // Sign and store signature | 552 | // Sign and store signature |
553 | if (GNUNET_SYSERR == | 553 | if (GNUNET_SYSERR == |
554 | GNUNET_CRYPTO_ecdsa_sign (issuer, | 554 | GNUNET_CRYPTO_ecdsa_sign_ (issuer, |
555 | purpose, | 555 | purpose, |
556 | (struct GNUNET_CRYPTO_EcdsaSignature *) | 556 | (struct GNUNET_CRYPTO_EcdsaSignature *) |
557 | buf_ptr)) | 557 | buf_ptr)) |
558 | { | 558 | { |
559 | GNUNET_break (0); | 559 | GNUNET_break (0); |
560 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to sign code\n"); | 560 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to sign code\n"); |
@@ -658,7 +658,8 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv, | |||
658 | code_verifier, | 658 | code_verifier, |
659 | strlen (code_verifier)); | 659 | strlen (code_verifier)); |
660 | // encode code verifier | 660 | // encode code verifier |
661 | GNUNET_STRINGS_base64url_encode (code_verifier_hash, 256 / 8, &expected_code_challenge); | 661 | GNUNET_STRINGS_base64url_encode (code_verifier_hash, 256 / 8, |
662 | &expected_code_challenge); | ||
662 | code_challenge = (char *) ¶ms[1]; | 663 | code_challenge = (char *) ¶ms[1]; |
663 | GNUNET_free (code_verifier_hash); | 664 | GNUNET_free (code_verifier_hash); |
664 | if ((strlen (expected_code_challenge) != code_challenge_len) || | 665 | if ((strlen (expected_code_challenge) != code_challenge_len) || |
@@ -692,10 +693,10 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv, | |||
692 | return GNUNET_SYSERR; | 693 | return GNUNET_SYSERR; |
693 | } | 694 | } |
694 | if (GNUNET_OK != | 695 | if (GNUNET_OK != |
695 | GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN, | 696 | GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN, |
696 | purpose, | 697 | purpose, |
697 | signature, | 698 | signature, |
698 | &ticket->identity)) | 699 | &ticket->identity)) |
699 | { | 700 | { |
700 | GNUNET_free (code_payload); | 701 | GNUNET_free (code_payload); |
701 | GNUNET_free (plaintext); | 702 | GNUNET_free (plaintext); |