summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trust/extract-jks.c4
-rw-r--r--trust/extract-openssl.c2
-rw-r--r--trust/x509.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/trust/extract-jks.c b/trust/extract-jks.c
index 8a39cfd..e12b2de 100644
--- a/trust/extract-jks.c
+++ b/trust/extract-jks.c
@@ -302,8 +302,8 @@ prepare_jks_buffer (P11KitIter *iter,
digest = p11_buffer_append (buffer, P11_DIGEST_SHA1_LEN);
return_val_if_fail (digest != NULL, false);
p11_digest_sha1 (digest,
- "\000c\000h\000a\000n\000g\000e\000i\000t", 16, /* default password */
- "Mighty Aphrodite", 16, /* go figure */
+ "\000c\000h\000a\000n\000g\000e\000i\000t", (size_t)16, /* default password */
+ "Mighty Aphrodite", (size_t)16, /* go figure */
buffer->data, length,
NULL);
diff --git a/trust/extract-openssl.c b/trust/extract-openssl.c
index c2d37f3..666f189 100644
--- a/trust/extract-openssl.c
+++ b/trust/extract-openssl.c
@@ -572,7 +572,7 @@ symlink_for_subject_old_hash (p11_extract_info *ex)
if (!subject)
return NULL;
- p11_digest_md5 (md, subject->pValue, subject->ulValueLen, NULL);
+ p11_digest_md5 (md, subject->pValue, (size_t)subject->ulValueLen, NULL);
hash = (
((unsigned long)md[0] ) | ((unsigned long)md[1] << 8L) |
diff --git a/trust/x509.c b/trust/x509.c
index f49be73..b93d26c 100644
--- a/trust/x509.c
+++ b/trust/x509.c
@@ -98,6 +98,7 @@ p11_x509_calc_keyid (node_asn *cert,
unsigned char *keyid)
{
int start, end;
+ size_t len;
int ret;
return_val_if_fail (cert != NULL, NULL);
@@ -108,7 +109,8 @@ p11_x509_calc_keyid (node_asn *cert,
return_val_if_fail (ret == ASN1_SUCCESS, false);
return_val_if_fail (end >= start, false);
- p11_digest_sha1 (keyid, (der + start), (end - start) + 1, NULL);
+ len = (end - start) + 1;
+ p11_digest_sha1 (keyid, (der + start), len, NULL);
return true;
}