]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use client credentials, if set.
authorMichael R Sweet <msweet@msweet.org>
Sat, 19 Oct 2024 21:05:48 +0000 (17:05 -0400)
committerMichael R Sweet <msweet@msweet.org>
Sat, 19 Oct 2024 21:05:48 +0000 (17:05 -0400)
cups/http.c

index ded6ff234020943ca8685eb6b0f7ccb64f902c81..009467696f12fcb69be8aa22419e90eecd1cb6aa 100644 (file)
@@ -341,6 +341,8 @@ httpClose(http_t *http)                     // I - HTTP connection
   if (http->authstring && http->authstring != http->_authstring)
     free(http->authstring);
 
+  _httpFreeCredentials(http->tls_credentials);
+
   free(http);
 }
 
@@ -3789,6 +3791,7 @@ http_create(
   http_t       *http;                  // New HTTP connection
   char         service[255];           // Service name
   http_addrlist_t *myaddrlist = NULL;  // My address list
+  _cups_globals_t *cg = _cupsGlobals();        // Thread global data
 
 
   DEBUG_printf("4http_create(host=\"%s\", port=%d, addrlist=%p, family=%d, encryption=%d, blocking=%d, mode=%d)", host, port, (void *)addrlist, family, encryption, blocking, mode);
@@ -3868,6 +3871,9 @@ http_create(
 
   http_set_wait(http);
 
+  // Set client credentials...
+  http->tls_credentials = _httpUseCredentials(cg->credentials);
+
   // Return the new structure...
   return (http);
 }