Home | History | Annotate | Download | only in cups

Lines Matching refs:http

11  * missing or damaged, see the license at "http://www.cups.org/".
71 static int http_cdsa_set_credentials(http_t *http);
431 http_t *http, /* I - Connection to server */
442 DEBUG_printf(("httpCopyCredentials(http=%p, credentials=%p)", (void *)http, (void *)credentials));
447 if (!http || !http->tls || !credentials)
450 if (!(error = SSLCopyPeerTrust(http->tls, &peerTrust)) && peerTrust)
1076 _httpTLSPending(http_t *http) /* I - HTTP connection */
1081 if (!SSLGetBufferedReadSize(http->tls, &bytes))
1093 _httpTLSRead(http_t *http, /* I - HTTP connection */
1102 error = SSLRead(http->tls, buf, (size_t)len, &processed);
1154 http) /* I - HTTP connection */
1171 DEBUG_printf(("3_httpTLSStart(http=%p)", (void *)http));
1181 if (http->mode == _HTTP_MODE_SERVER && !tls_keychain)
1184 http->error = errno = EINVAL;
1185 http->status = HTTP_STATUS_ERROR;
1192 if ((http->tls = SSLCreateContext(kCFAllocatorDefault, http->mode == _HTTP_MODE_CLIENT ? kSSLClientSide : kSSLServerSide, kSSLStreamType)) == NULL)
1195 http->error = errno = ENOMEM;
1196 http->status = HTTP_STATUS_ERROR;
1202 error = SSLSetConnection(http->tls, http);
1207 error = SSLSetIOFuncs(http->tls, http_cdsa_read, http_cdsa_write);
1213 error = SSLSetSessionOption(http->tls, kSSLSessionOptionBreakOnServerAuth,
1229 error = SSLSetProtocolVersionMin(http->tls, minProtocol);
1234 error = SSLSetProtocolVersionMax(http->tls, kTLSProtocol1);
1248 error = SSLGetSupportedCiphers(http->tls, supported, &num_supported);
1396 error = SSLSetEnabledCiphers(http->tls, enabled, num_enabled);
1401 if (!error && http->mode == _HTTP_MODE_CLIENT)
1409 error = SSLSetSessionOption(http->tls,
1416 error = http_cdsa_set_credentials(http);
1427 if (http->fields[HTTP_FIELD_HOST][0])
1433 strlcpy(hostname, http->fields[HTTP_FIELD_HOST], sizeof(hostname));
1445 if (getsockname(http->fd, (struct sockaddr *)&addr, &addrlen))
1463 http->tls_credentials = http_cdsa_copy_server(hostname);
1465 http->tls_credentials = http_cdsa_copy_server(tls_common_name);
1467 if (!http->tls_credentials && tls_auto_create && (hostname[0] || tls_common_name))
1474 http->error = errno = EINVAL;
1475 http->status = HTTP_STATUS_ERROR;
1481 http->tls_credentials = http_cdsa_copy_server(hostname[0] ? hostname : tls_common_name);
1484 if (!http->tls_credentials)
1487 http->error = errno = EINVAL;
1488 http->status = HTTP_STATUS_ERROR;
1494 error = SSLSetCertificate(http->tls, http->tls_credentials);
1499 DEBUG_printf(("4_httpTLSStart: tls_credentials=%p", (void *)http->tls_credentials));
1506 if (!error && http->mode == _HTTP_MODE_CLIENT)
1512 if (httpAddrLocalhost(http->hostaddr))
1522 strlcpy(hostname, http->hostname, sizeof(hostname));
1528 error = SSLSetPeerDomainName(http->tls, hostname, strlen(hostname));
1539 error = SSLHandshake(http->tls);
1558 error = httpCopyCredentials(http, &credentials);
1561 error = (cg->server_cert_cb)(http, http->tls, credentials,
1577 if (!(error = SSLCopyDistinguishedNames(http->tls, &dn_array)) &&
1606 error = (cg->client_cert_cb)(http, http->tls, names,
1660 http->error = error;
1661 http->status = HTTP_STATUS_ERROR;
1664 CFRelease(http->tls);
1665 http->tls = NULL;
1692 _httpTLSStop(http_t *http) /* I - HTTP connection */
1694 while (SSLClose(http->tls) == errSSLWouldBlock)
1697 CFRelease(http->tls);
1699 if (http->tls_credentials)
1700 CFRelease(http->tls_credentials);
1702 http->tls = NULL;
1703 http->tls_credentials = NULL;
1712 _httpTLSWrite(http_t *http, /* I - HTTP connection */
1721 DEBUG_printf(("2_httpTLSWrite(http=%p, buf=%p, len=%d)", (void *)http, (void *)buf, len));
1723 error = SSLWrite(http->tls, buf, (size_t)len, &processed);
2083 http_t *http; /* HTTP connection */
2086 http = (http_t *)connection;
2088 if (!http->blocking)
2094 while (!_httpWait(http, http->wait_value, 0))
2096 if (http->timeout_cb && (*http->timeout_cb)(http, http->timeout_data))
2099 http->error = ETIMEDOUT;
2106 bytes = recv(http->fd, data, *dataLength, 0);
2140 http_cdsa_set_credentials(http_t *http) /* I - HTTP connection */
2148 DEBUG_printf(("7http_tls_set_credentials(%p)", (void *)http));
2154 if ((credentials = http->tls_credentials) == NULL)
2159 error = SSLSetCertificate(http->tls, credentials);
2182 http_t *http; /* HTTP connection */
2185 http = (http_t *)connection;
2189 bytes = write(http->fd, data, *dataLength);