charybdis-ircd / charybdis

Scalable IRCv3.2 server for large, community-oriented networks
GNU General Public License v2.0
231 stars 102 forks source link

properly call gnutls_x509_crt_list_import #238

Closed anarcat closed 7 years ago

anarcat commented 7 years ago

the manpage says:

unsigned int * cert_max Initially must hold the maximum number of certs. It will be updated with the number of certs available.

ratbox doesn't actually initialize that variable, so gnutls naturally fails. i would also recommend considering dynamically allocating the cert list to deal with that error in other ways than failing to configured SSL completely in GnuTLS. the apache gnutls module has a similar problem and came up with a patch to do exactly this which you may want to consider.

but since our cert chain is only (!) 5 certs long, our itched is scratch by this particular patch.

aaronmdjones commented 7 years ago

I have no idea how I didn't see that. I spent an entire day reading the documentation for all of the functions.

Oh well. Thank you.