Commit dfde6c83 authored by Niels Möller's avatar Niels Möller
Browse files

Made lsh_malloc and lsh_free internal functions. Other files should

always use lsh_string_alloc, lsh_space_alloc or lsh_object_alloc
instead.

Rev: src/publickey_crypto.c:1.18
parent fc1986d9
...@@ -72,7 +72,7 @@ static void dss_hash(mpz_t h, UINT32 length, UINT8 *msg) ...@@ -72,7 +72,7 @@ static void dss_hash(mpz_t h, UINT32 length, UINT8 *msg)
debug_mpz(h); debug_mpz(h);
debug("\n"); debug("\n");
lsh_free(hash); lsh_object_free(hash);
} }
static struct lsh_string *do_dss_sign(struct signer *c, static struct lsh_string *do_dss_sign(struct signer *c,
...@@ -328,7 +328,7 @@ static struct signer *make_dss_signer(struct signature_algorithm *c, ...@@ -328,7 +328,7 @@ static struct signer *make_dss_signer(struct signature_algorithm *c,
mpz_clear(res->public.g); mpz_clear(res->public.g);
mpz_clear(res->public.y); mpz_clear(res->public.y);
mpz_clear(res->a); mpz_clear(res->a);
lsh_free(res); lsh_object_free(res);
return NULL; return NULL;
} }
...@@ -365,7 +365,7 @@ static struct verifier *make_dss_verifier(struct signature_algorithm *closure, ...@@ -365,7 +365,7 @@ static struct verifier *make_dss_verifier(struct signature_algorithm *closure,
mpz_clear(res->public.q); mpz_clear(res->public.q);
mpz_clear(res->public.g); mpz_clear(res->public.g);
mpz_clear(res->public.y); mpz_clear(res->public.y);
lsh_free(res); lsh_object_free(res);
return NULL; return NULL;
} }
...@@ -499,7 +499,7 @@ struct diffie_hellman_method *make_dh1(struct randomness *r) ...@@ -499,7 +499,7 @@ struct diffie_hellman_method *make_dh1(struct randomness *r)
mpz_t p; mpz_t p;
NEW(res); NEW(res);
mpz_init_set_str(p, mpz_init_set_str(p,
"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"
"29024E088A67CC74020BBEA63B139B22514A08798E3404DD" "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment