diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2020-01-01 00:00:00 +0100 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-06-19 15:44:24 +0200 |
commit | 6202ffc3fa4ffd0ab4f62535a0526792571f76e7 (patch) | |
tree | 3a08b46f05339658544411bbd92ef93642c364f0 /src/utilities.h | |
parent | b421139970323462df02c52bccfc960558d4c10f (diff) |
Add a signature and verification function for JWS
Diffstat (limited to 'src/utilities.h')
-rw-r--r-- | src/utilities.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/utilities.h b/src/utilities.h index ae5d82c..c07265e 100644 --- a/src/utilities.h +++ b/src/utilities.h @@ -71,7 +71,7 @@ static int do_rsa_public_key_load (struct rsa_public_key *x, SCM data); static int do_rsa_private_key_load (struct rsa_private_key *x, SCM data); /* Register x to be destroyed at the end of the dynamic wind. */ -static void dynwind_mpz_t_clear (mpz_t x); +static void dynwind_mpz_t_clear (mpz_t * x); static void dynwind_ecc_point_clear (struct ecc_point *x); static void dynwind_ecc_scalar_clear (struct ecc_scalar *x); static void dynwind_rsa_public_key_clear (struct rsa_public_key *x); @@ -167,9 +167,9 @@ wrap_ecc_point (const struct ecc_curve *crv, const struct ecc_point *point) SCM ret; scm_dynwind_begin (0); mpz_init (x); - dynwind_mpz_t_clear (x); + dynwind_mpz_t_clear (&x); mpz_init (y); - dynwind_mpz_t_clear (y); + dynwind_mpz_t_clear (&y); ecc_point_get (point, x, y); ret = scm_list_3 (scm_cons (kcrv, wrap_ecc_curve (crv)), @@ -185,7 +185,7 @@ wrap_ecc_scalar (const struct ecc_curve *crv, const struct ecc_scalar *scalar) SCM ret; scm_dynwind_begin (0); mpz_init (z); - dynwind_mpz_t_clear (z); + dynwind_mpz_t_clear (&z); ecc_scalar_get (scalar, z); ret = scm_list_2 (scm_cons (kcrv, wrap_ecc_curve (crv)), @@ -314,9 +314,9 @@ do_ecc_point_load (struct ecc_point *point, SCM data) int ret = 1; scm_dynwind_begin (0); mpz_init (x); - dynwind_mpz_t_clear (x); + dynwind_mpz_t_clear (&x); mpz_init (y); - dynwind_mpz_t_clear (y); + dynwind_mpz_t_clear (&y); ret = (do_mpz_t_load (x, scm_assq_ref (data, kx), 0) && do_mpz_t_load (y, scm_assq_ref (data, ky), 0) @@ -332,7 +332,7 @@ do_ecc_scalar_load (struct ecc_scalar *scalar, SCM data) int ret = 1; scm_dynwind_begin (0); mpz_init (z); - dynwind_mpz_t_clear (z); + dynwind_mpz_t_clear (&z); ret = (do_mpz_t_load (z, scm_assq_ref (data, kd), 0) && ecc_scalar_set (scalar, z)); @@ -396,9 +396,9 @@ do_ecc_scalar_clear (void *ptr) } static inline void -dynwind_mpz_t_clear (mpz_t z) +dynwind_mpz_t_clear (mpz_t * z) { - scm_dynwind_unwind_handler (do_mpz_t_clear, &z, SCM_F_WIND_EXPLICITLY); + scm_dynwind_unwind_handler (do_mpz_t_clear, z, SCM_F_WIND_EXPLICITLY); } static inline void |