summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/pk/dsa
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-06-10 23:16:13 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-06-10 23:16:13 +0800
commit4b305c5721f68e39320ca2e15b03a411da2305f1 (patch)
tree5b1698939cf893223f14cec77ed446f28a7d921a /libtomcrypt/src/pk/dsa
parent615885be01188e433cf931e2f7f85394fdc31c5d (diff)
Merge libtomcrypt v1.18.2
Diffstat (limited to 'libtomcrypt/src/pk/dsa')
-rw-r--r--libtomcrypt/src/pk/dsa/dsa_export.c2
-rw-r--r--libtomcrypt/src/pk/dsa/dsa_generate_pqg.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libtomcrypt/src/pk/dsa/dsa_export.c b/libtomcrypt/src/pk/dsa/dsa_export.c
index 1f6bb5a..f3a9f59 100644
--- a/libtomcrypt/src/pk/dsa/dsa_export.c
+++ b/libtomcrypt/src/pk/dsa/dsa_export.c
@@ -69,7 +69,7 @@ int dsa_export(unsigned char *out, unsigned long *outlen, int type, dsa_key *key
}
} else {
if (std) {
- unsigned long tmplen = (mp_count_bits(key->y) / 8) + 8;
+ unsigned long tmplen = (unsigned long)(mp_count_bits(key->y) / 8) + 8;
unsigned char* tmp = XMALLOC(tmplen);
ltc_asn1_list int_list[3];
diff --git a/libtomcrypt/src/pk/dsa/dsa_generate_pqg.c b/libtomcrypt/src/pk/dsa/dsa_generate_pqg.c
index 91c7ef7..8c5f558 100644
--- a/libtomcrypt/src/pk/dsa/dsa_generate_pqg.c
+++ b/libtomcrypt/src/pk/dsa/dsa_generate_pqg.c
@@ -72,8 +72,8 @@ static int _dsa_make_params(prng_state *prng, int wprng, int group_size, int mod
*/
seedbytes = group_size;
- L = modulus_size * 8;
- N = group_size * 8;
+ L = (unsigned long)modulus_size * 8;
+ N = (unsigned long)group_size * 8;
/* XXX-TODO no Lucas test */
#ifdef LTC_MPI_HAS_LUCAS_TEST