]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Simplify extra_certs handling w.r.t. assign_privkey()
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 15 Nov 2013 22:11:46 +0000 (22:11 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 15 Nov 2013 22:43:18 +0000 (22:43 +0000)
commit04ccc265c3e8a127e959ee1db95cc290bc80642e
tree1c6ef75c59cdac37ea65b961212d5a7e5a48244c
parent47379075901c713294bdd43c1246447aefcb8ccf
Simplify extra_certs handling w.r.t. assign_privkey()

With the free_supporting_certs[] array, there's no need to pass
extra_certs[] in to the GnuTLS 2 version of assign_privkey() just to
let it remove the certs that it wants to steal. Instead, remove them as
we *find* them and put them into the supporting_certs[] array, and mark
them as "to be freed".

By keeping the free_my_certs[] array, this also fixes a bug in the
GnuTLS 2 code where we would end up freeing a cert which was obtained
by gnutls_certificate_get_issuer(), which we are *supposed* to treat as
being constant.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
gnutls.c
openconnect-internal.h