summaryrefslogtreecommitdiff
path: root/trust/x509.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2013-07-17 20:42:03 +0200
committerStef Walter <stef@thewalter.net>2013-07-18 13:04:37 +0200
commit2a69ff5691e114362564a2ab572cd4b3b20dcc27 (patch)
treef3c25282d90e6a002ba987d0c41798b5319413d8 /trust/x509.c
parent1548d82560b242579f5ba216b66bd59ccd0f3fd0 (diff)
Always pass size_t varargs to p11_hash_xxx() functions
https://bugzilla.redhat.com/show_bug.cgi?id=985421
Diffstat (limited to 'trust/x509.c')
-rw-r--r--trust/x509.c4
1 files changed, 3 insertions, 1 deletions
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;
}