diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-09-17 09:12:29 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-09-17 09:09:19 +0000 |
commit | 55479c057e8224e065979bfb2beedc84f6fad701 (patch) | |
tree | 49a660acf6db7ac5f17f9ce879e16ef32f7d3c3b | |
parent | 091539245b1a3cc010f2c2cb9ffe9c664cb2f44c (diff) | |
download | gnutls-55479c057e8224e065979bfb2beedc84f6fad701.tar.gz |
gnutls_x509_trust_list_add_cas: corrected return value
When the flag GNUTLS_TL_USE_IN_TLS is used and add_new_ca_to_rdn_seq
the return value did not include the last certificate added to the
list. This corrects its return value.
Relates #552
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | lib/x509/verify-high.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/x509/verify-high.c b/lib/x509/verify-high.c index 13ba5289b0..03c63c2687 100644 --- a/lib/x509/verify-high.c +++ b/lib/x509/verify-high.c @@ -344,7 +344,7 @@ gnutls_x509_trust_list_add_cas(gnutls_x509_trust_list_t list, ret = add_new_ca_to_rdn_seq(list, clist[i]); if (ret < 0) { gnutls_assert(); - return i; + return i+1; } } } |