aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2012-06-28 15:48:32 +0200
committerYang Tse <yangsita@gmail.com>2012-06-28 16:52:17 +0200
commitc0f2bfb2c763fdbaa1fd012033fe14b0e3c467b1 (patch)
tree8d81d649b8ae05ea2a15a6183f74ce7dfaef4f21
parent74552acaea279bc96950964b9069378ccc3238f9 (diff)
nss.c: Fixed size_t conversion warnings
-rw-r--r--lib/nss.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/nss.c b/lib/nss.c
index cb742c1b0..a7957736d 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -1538,7 +1538,7 @@ void Curl_nss_random(struct SessionHandle *data,
size_t length)
{
Curl_nss_seed(data); /* Initiate the seed if not already done */
- PK11_GenerateRandom(entropy, length);
+ PK11_GenerateRandom(entropy, curlx_uztosi(length));
}
void Curl_nss_md5sum(unsigned char *tmp, /* input */
@@ -1548,8 +1548,8 @@ void Curl_nss_md5sum(unsigned char *tmp, /* input */
{
PK11Context *MD5pw = PK11_CreateDigestContext(SEC_OID_MD5);
unsigned int MD5out;
- PK11_DigestOp(MD5pw, tmp, tmplen);
- PK11_DigestFinal(MD5pw, md5sum, &MD5out, md5len);
+ PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen));
+ PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len));
PK11_DestroyContext(MD5pw, PR_TRUE);
}