]> arthur.barton.de Git - ngircd.git/commitdiff
S2S-TLS/GnuTLS: Update SSL code for GnuTLS certificate reloading
authorAlexander Barton <alex@barton.de>
Fri, 5 Jan 2024 21:23:53 +0000 (22:23 +0100)
committerAlexander Barton <alex@barton.de>
Sat, 23 Mar 2024 19:19:01 +0000 (20:19 +0100)
Without this, the S2S-TLS-Patch not even compiles with GnuTLS because
of the "new" GnuTLS certificate reload support implemented in commit
eead4a63 ("x509_cred_slot").

src/ngircd/conn-ssl.c

index 5011628874a4ee5cad3ba393b002e3fa285232d1..cef580f8699dc9c3a0ce82cafdb96f2a48352142 100644 (file)
@@ -468,6 +468,9 @@ ConnSSL_SetVerifyProperties_gnutls(void)
        if (!Conf_SSLOptions.CAFile)
                return true;
 
+       x509_cred_slot *slot = array_get(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
+       gnutls_certificate_credentials_t x509_cred = slot->x509_cred;
+
        err = gnutls_certificate_set_x509_trust_file(x509_cred,
                                                     Conf_SSLOptions.CAFile,
                                                     GNUTLS_X509_FMT_PEM);