]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
tls-gnutls.c: Pass gnutls pointer to `gnutls_credentials_set()` 1040/head
authorZdenek Dohnal <zdohnal@redhat.com>
Fri, 30 Aug 2024 05:34:04 +0000 (07:34 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Fri, 30 Aug 2024 05:34:04 +0000 (07:34 +0200)
`credentials` changed type in 2.5, now gnutls pointer, which is needed
for the mentioned function, is a member of new structure which is
`credentials` now, so pass `credential->creds` to the function,
otherwise it crashes.

Found out during running the test suite with gnutls enabled.

cups/tls-gnutls.c

index 49cd2ed96a6ba5bdd991f292a25f606646c54e66..ede3e3712103d72fd9e9e449fd274edc1b1b2267 100644 (file)
@@ -1717,7 +1717,7 @@ _httpTLSStart(http_t *http)               // I - Connection to server
   }
 
   if (!status && credentials)
-    status = gnutls_credentials_set(http->tls, GNUTLS_CRD_CERTIFICATE, credentials);
+    status = gnutls_credentials_set(http->tls, GNUTLS_CRD_CERTIFICATE, credentials->creds);
 
   if (status)
   {