This was added in commit
04ccc265c ("Simplify extra_certs handling
w.r.t. assign_privkey()") because GnuTLS 2 didn't take a copy of the
certs which were assigned to the creds, and we needed to keep track of
which extra certs were used and which weren't.
The GnuTLS 3 variant of assign_privkey() didn't use it, since GnuTLS 3
takes a copy of the certs and we can just free them normally.
Now that we've dropped GnuTLS 2 support, we can drop this argument too
and simplify assign_privkey() a little bit.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
static int assign_privkey(struct openconnect_info *vpninfo,
gnutls_privkey_t pkey,
gnutls_x509_crt_t *certs,
- unsigned int nr_certs,
- uint8_t *free_certs)
+ unsigned int nr_certs)
{
gnutls_pcert_st *pcerts = gnutls_calloc(nr_certs, sizeof(*pcerts));
unsigned int i;
#endif
err = assign_privkey(vpninfo, pkey,
supporting_certs,
- nr_supporting_certs,
- free_supporting_certs);
+ nr_supporting_certs);
if (!err) {
pkey = NULL; /* we gave it away, and potentially also some
of extra_certs[] may have been zeroed. */