summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-11-24 09:54:17 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-11-25 11:06:33 +0100
commit9cf782b9db4f7c743312e15b4eff8e3ec15f0c7d (patch)
treee3802ca7c3e031fccbd40b8514f8030d26925191
parent815cfa6214f84f16e716e93809356b06ac97d430 (diff)
downloadgnutls-9cf782b9db4f7c743312e15b4eff8e3ec15f0c7d.tar.gz
pkcs7: corrected iteration over stored certificates
This allows to use all possibly stored certificates on chain discovery, not only the first.
-rw-r--r--lib/x509/pkcs7.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c
index 3ac9d3d10d..66789345d2 100644
--- a/lib/x509/pkcs7.c
+++ b/lib/x509/pkcs7.c
@@ -1068,7 +1068,7 @@ gnutls_x509_crt_t find_signer(gnutls_pkcs7_t pkcs7, gnutls_x509_trust_list_t tl,
for (i=0;i<(unsigned)count;i++) {
/* Try to find the signer in the appended list. */
- ret = gnutls_pkcs7_get_crt_raw2(pkcs7, 0, &tmp);
+ ret = gnutls_pkcs7_get_crt_raw2(pkcs7, i, &tmp);
if (ret < 0) {
gnutls_assert();
goto fail;