Skip to content

Commit fcb0bc8

Browse files
committed
Use client credentials, if set.
1 parent 0542b9d commit fcb0bc8

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

cups/http.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ httpClose(http_t *http) // I - HTTP connection
291291
free(http->authstring);
292292
free(http->cookie);
293293

294+
_httpFreeCredentials(http->tls_credentials);
295+
294296
free(http);
295297
}
296298

@@ -3341,6 +3343,7 @@ http_create(
33413343
http_t *http; // New HTTP connection
33423344
char service[255]; // Service name
33433345
http_addrlist_t *myaddrlist = NULL; // My address list
3346+
_cups_globals_t *cg = _cupsGlobals(); // Thread global data
33443347

33453348

33463349
DEBUG_printf("4http_create(host=\"%s\", port=%d, addrlist=%p, family=%d, encryption=%d, blocking=%s, mode=%d)", host, port, (void *)addrlist, family, encryption, blocking ? "true" : "false", mode);
@@ -3416,6 +3419,9 @@ http_create(
34163419

34173420
http_set_wait(http);
34183421

3422+
// Set client credentials...
3423+
http->tls_credentials = _httpUseCredentials(cg->credentials);
3424+
34193425
// Return the new structure...
34203426
return (http);
34213427
}

pdfio

0 commit comments

Comments
 (0)