0012-S2S-TLS-GnuTLS-Update-SSL-code-for-GnuTLS-certificat.patch 952 B

123456789101112131415161718192021222324252627
  1. From 8676c743246aaebe6d45f0978812c154ecfa25dd Mon Sep 17 00:00:00 2001
  2. From: Alexander Barton <alex@barton.de>
  3. Date: Fri, 5 Jan 2024 22:23:53 +0100
  4. Subject: [PATCH 12/20] S2S-TLS/GnuTLS: Update SSL code for GnuTLS certificate
  5. reloading
  6. Without this, the S2S-TLS-Patch not even compiles with GnuTLS because
  7. of the "new" GnuTLS certificate reload support implemented in commit
  8. eead4a63 ("x509_cred_slot").
  9. (cherry picked from commit 0e176b557037b583f408229b518646804b33d745)
  10. ---
  11. src/ngircd/conn-ssl.c | 3 +++
  12. 1 file changed, 3 insertions(+)
  13. --- a/src/ngircd/conn-ssl.c
  14. +++ b/src/ngircd/conn-ssl.c
  15. @@ -468,6 +468,9 @@
  16. if (!Conf_SSLOptions.CAFile)
  17. return true;
  18. + x509_cred_slot *slot = array_get(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
  19. + gnutls_certificate_credentials_t x509_cred = slot->x509_cred;
  20. +
  21. err = gnutls_certificate_set_x509_trust_file(x509_cred,
  22. Conf_SSLOptions.CAFile,
  23. GNUTLS_X509_FMT_PEM);