Lines Matching refs:sslsock
180 php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; in handle_ssl_error() local
181 int err = SSL_get_error(sslsock->ssl_handle, nr_bytes); in handle_ssl_error()
197 retry = is_init ? 1 : sslsock->s.is_blocked; in handle_ssl_error()
206 SSL_set_shutdown(sslsock->ssl_handle, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); in handle_ssl_error()
481 php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; in apply_peer_verification_policy() local
485 : sslsock->is_client; in apply_peer_verification_policy()
489 : sslsock->is_client; in apply_peer_verification_policy()
544 if (peer_name == NULL && sslsock->is_client) { in apply_peer_verification_policy()
545 peer_name = sslsock->url_name; in apply_peer_verification_policy()
597 php_openssl_netstream_data_t *sslsock; in win_cert_verify_callback() local
603 sslsock = (php_openssl_netstream_data_t*)stream->abstract; in win_cert_verify_callback()
721 ssl_policy_params.dwAuthType = (sslsock->is_client) ? AUTHTYPE_SERVER : AUTHTYPE_CLIENT; in win_cert_verify_callback()
838 php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; in enable_peer_verification() local
846 } else if (!sslsock->is_client) { in enable_peer_verification()
873 if (sslsock->is_client && !SSL_CTX_set_default_verify_paths(ctx)) { in enable_peer_verification()
1025 php_openssl_netstream_data_t *sslsock; in limit_handshake_reneg() local
1030 sslsock = (php_openssl_netstream_data_t*)stream->abstract; in limit_handshake_reneg()
1034 if (sslsock->reneg->prev_handshake == 0) { in limit_handshake_reneg()
1035 sslsock->reneg->prev_handshake = now.tv_sec; in limit_handshake_reneg()
1039 elapsed_time = (now.tv_sec - sslsock->reneg->prev_handshake); in limit_handshake_reneg()
1040 sslsock->reneg->prev_handshake = now.tv_sec; in limit_handshake_reneg()
1041 sslsock->reneg->tokens -= (elapsed_time * (sslsock->reneg->limit / sslsock->reneg->window)); in limit_handshake_reneg()
1043 if (sslsock->reneg->tokens < 0) { in limit_handshake_reneg()
1044 sslsock->reneg->tokens = 0; in limit_handshake_reneg()
1046 ++sslsock->reneg->tokens; in limit_handshake_reneg()
1049 if (sslsock->reneg->tokens > sslsock->reneg->limit) { in limit_handshake_reneg()
1053 sslsock->reneg->should_close = 1; in limit_handshake_reneg()
1071 sslsock->reneg->should_close = 0; in limit_handshake_reneg()
1092 static void init_server_reneg_limit(php_stream *stream, php_openssl_netstream_data_t *sslsock) /* {… in init_server_reneg_limit() argument
1119 sslsock->reneg = (void*)pemalloc(sizeof(php_openssl_handshake_bucket_t), in init_server_reneg_limit()
1123 sslsock->reneg->limit = limit; in init_server_reneg_limit()
1124 sslsock->reneg->window = window; in init_server_reneg_limit()
1125 sslsock->reneg->prev_handshake = 0; in init_server_reneg_limit()
1126 sslsock->reneg->tokens = 0; in init_server_reneg_limit()
1127 sslsock->reneg->should_close = 0; in init_server_reneg_limit()
1129 SSL_set_info_callback(sslsock->ssl_handle, info_callback); in init_server_reneg_limit()
1280 php_openssl_netstream_data_t *sslsock; in server_sni_callback() local
1291 sslsock = (php_openssl_netstream_data_t*)stream->abstract; in server_sni_callback()
1293 if (!(sslsock->sni_cert_count && sslsock->sni_certs)) { in server_sni_callback()
1297 for (i=0; i < sslsock->sni_cert_count; i++) { in server_sni_callback()
1298 if (matches_wildcard_name(server_name, sslsock->sni_certs[i].name)) { in server_sni_callback()
1299 SSL_set_SSL_CTX(ssl_handle, sslsock->sni_certs[i].ctx); in server_sni_callback()
1308 static int enable_server_sni(php_stream *stream, php_openssl_netstream_data_t *sslsock) in enable_server_sni() argument
1335 sslsock->sni_cert_count = zend_hash_num_elements(Z_ARRVAL_P(val)); in enable_server_sni()
1336 if (sslsock->sni_cert_count == 0) { in enable_server_sni()
1343 sslsock->sni_certs = (php_openssl_sni_cert_t*)safe_pemalloc(sslsock->sni_cert_count, in enable_server_sni()
1346 memset(sslsock->sni_certs, 0, sslsock->sni_cert_count * sizeof(php_openssl_sni_cert_t)); in enable_server_sni()
1380 sslsock->sni_certs[i].name = pestrdup(ZSTR_VAL(key), php_stream_is_persistent(stream)); in enable_server_sni()
1381 sslsock->sni_certs[i].ctx = ctx; in enable_server_sni()
1393 SSL_CTX_set_tlsext_servername_callback(sslsock->ctx, server_sni_callback); in enable_server_sni()
1398 static void enable_client_sni(php_stream *stream, php_openssl_netstream_data_t *sslsock) /* {{{ */ in enable_client_sni() argument
1408 sni_server_name = sslsock->url_name; in enable_client_sni()
1413 SSL_set_tlsext_host_name(sslsock->ssl_handle, sni_server_name); in enable_client_sni()
1465 php_openssl_netstream_data_t *sslsock = arg; in server_alpn_callback() local
1468 ((unsigned char **)out, outlen, sslsock->alpn_ctx->data, sslsock->alpn_ctx->len, in, in server_alpn_callback()
1479 php_openssl_netstream_data_t *sslsock, in php_openssl_setup_crypto() argument
1490 if (sslsock->ssl_handle) { in php_openssl_setup_crypto()
1491 if (sslsock->s.is_blocked) { in php_openssl_setup_crypto()
1503 sslsock->is_client = cparam->inputs.method & STREAM_CRYPTO_IS_CLIENT; in php_openssl_setup_crypto()
1509 method = php_select_crypto_method(method_flags, sslsock->is_client); in php_openssl_setup_crypto()
1514 method = sslsock->is_client ? SSLv23_client_method() : SSLv23_server_method(); in php_openssl_setup_crypto()
1521 sslsock->ctx = SSL_CTX_new(method); in php_openssl_setup_crypto()
1523 if (sslsock->ctx == NULL) { in php_openssl_setup_crypto()
1539 disable_peer_verification(sslsock->ctx, stream); in php_openssl_setup_crypto()
1540 } else if (FAILURE == enable_peer_verification(sslsock->ctx, stream)) { in php_openssl_setup_crypto()
1546 SSL_CTX_set_default_passwd_cb_userdata(sslsock->ctx, stream); in php_openssl_setup_crypto()
1547 SSL_CTX_set_default_passwd_cb(sslsock->ctx, passwd_callback); in php_openssl_setup_crypto()
1557 if (SSL_CTX_set_cipher_list(sslsock->ctx, cipherlist) != 1) { in php_openssl_setup_crypto()
1571 SSL_CTX_free(sslsock->ctx); in php_openssl_setup_crypto()
1572 sslsock->ctx = NULL; in php_openssl_setup_crypto()
1575 if (sslsock->is_client) { in php_openssl_setup_crypto()
1576 SSL_CTX_set_alpn_protos(sslsock->ctx, alpn, alpn_len); in php_openssl_setup_crypto()
1578 …sslsock->alpn_ctx = (php_openssl_alpn_ctx *) pemalloc(sizeof(php_openssl_alpn_ctx), php_stream_is_… in php_openssl_setup_crypto()
1579 …sslsock->alpn_ctx->data = (unsigned char *) pestrndup((const char*)alpn, alpn_len, php_stream_is_p… in php_openssl_setup_crypto()
1580 sslsock->alpn_ctx->len = alpn_len; in php_openssl_setup_crypto()
1581 SSL_CTX_set_alpn_select_cb(sslsock->ctx, server_alpn_callback, sslsock); in php_openssl_setup_crypto()
1592 if (FAILURE == set_local_cert(sslsock->ctx, stream)) { in php_openssl_setup_crypto()
1596 SSL_CTX_set_options(sslsock->ctx, ssl_ctx_options); in php_openssl_setup_crypto()
1598 if (sslsock->is_client == 0 && in php_openssl_setup_crypto()
1600 FAILURE == set_server_specific_opts(stream, sslsock->ctx) in php_openssl_setup_crypto()
1605 sslsock->ssl_handle = SSL_new(sslsock->ctx); in php_openssl_setup_crypto()
1607 if (sslsock->ssl_handle == NULL) { in php_openssl_setup_crypto()
1609 SSL_CTX_free(sslsock->ctx); in php_openssl_setup_crypto()
1610 sslsock->ctx = NULL; in php_openssl_setup_crypto()
1612 if (sslsock->alpn_ctx) { in php_openssl_setup_crypto()
1613 pefree(sslsock->alpn_ctx->data, php_stream_is_persistent(stream)); in php_openssl_setup_crypto()
1614 pefree(sslsock->alpn_ctx, php_stream_is_persistent(stream)); in php_openssl_setup_crypto()
1615 sslsock->alpn_ctx = NULL; in php_openssl_setup_crypto()
1620 SSL_set_ex_data(sslsock->ssl_handle, php_openssl_get_ssl_stream_data_index(), stream); in php_openssl_setup_crypto()
1623 if (!SSL_set_fd(sslsock->ssl_handle, sslsock->s.socket)) { in php_openssl_setup_crypto()
1629 if (!sslsock->is_client && enable_server_sni(stream, sslsock) == FAILURE) { in php_openssl_setup_crypto()
1635 if (!sslsock->is_client) { in php_openssl_setup_crypto()
1636 init_server_reneg_limit(stream, sslsock); in php_openssl_setup_crypto()
1640 SSL_set_mode(sslsock->ssl_handle, SSL_get_mode(sslsock->ssl_handle) | SSL_MODE_RELEASE_BUFFERS); in php_openssl_setup_crypto()
1649 …SSL_copy_session_id(sslsock->ssl_handle, ((php_openssl_netstream_data_t*)cparam->inputs.session->a… in php_openssl_setup_crypto()
1697 static int capture_peer_certs(php_stream *stream, php_openssl_netstream_data_t *sslsock, X509 *peer… in capture_peer_certs() argument
1719 chain = SSL_get_peer_cert_chain(sslsock->ssl_handle); in capture_peer_certs()
1744 php_openssl_netstream_data_t *sslsock, in php_openssl_enable_crypto() argument
1753 if (cparam->inputs.activate && !sslsock->ssl_active) { in php_openssl_enable_crypto()
1756 int blocked = sslsock->s.is_blocked, in php_openssl_enable_crypto()
1760 if (sslsock->is_client) { in php_openssl_enable_crypto()
1761 enable_client_sni(stream, sslsock); in php_openssl_enable_crypto()
1765 if (!sslsock->state_set) { in php_openssl_enable_crypto()
1766 if (sslsock->is_client) { in php_openssl_enable_crypto()
1767 SSL_set_connect_state(sslsock->ssl_handle); in php_openssl_enable_crypto()
1769 SSL_set_accept_state(sslsock->ssl_handle); in php_openssl_enable_crypto()
1771 sslsock->state_set = 1; in php_openssl_enable_crypto()
1774 if (SUCCESS == php_set_sock_blocking(sslsock->s.socket, 0)) { in php_openssl_enable_crypto()
1775 sslsock->s.is_blocked = 0; in php_openssl_enable_crypto()
1779 sslsock->ssl_handle, in php_openssl_enable_crypto()
1781 SSL_get_mode(sslsock->ssl_handle) | in php_openssl_enable_crypto()
1788 timeout = sslsock->is_client ? &sslsock->connect_timeout : &sslsock->s.timeout; in php_openssl_enable_crypto()
1789 has_timeout = !sslsock->s.is_blocked && (timeout->tv_sec || timeout->tv_usec); in php_openssl_enable_crypto()
1799 if (sslsock->is_client) { in php_openssl_enable_crypto()
1800 n = SSL_connect(sslsock->ssl_handle); in php_openssl_enable_crypto()
1802 n = SSL_accept(sslsock->ssl_handle); in php_openssl_enable_crypto()
1821 int err = SSL_get_error(sslsock->ssl_handle, n); in php_openssl_enable_crypto()
1827 php_pollfd_for(sslsock->s.socket, (err == SSL_ERROR_WANT_READ) ? in php_openssl_enable_crypto()
1835 …if (sslsock->s.is_blocked != blocked && SUCCESS == php_set_sock_blocking(sslsock->s.socket, blocke… in php_openssl_enable_crypto()
1836 sslsock->s.is_blocked = blocked; in php_openssl_enable_crypto()
1840 peer_cert = SSL_get_peer_certificate(sslsock->ssl_handle); in php_openssl_enable_crypto()
1842 cert_captured = capture_peer_certs(stream, sslsock, peer_cert); in php_openssl_enable_crypto()
1845 if (FAILURE == apply_peer_verification_policy(sslsock->ssl_handle, peer_cert, stream)) { in php_openssl_enable_crypto()
1846 SSL_shutdown(sslsock->ssl_handle); in php_openssl_enable_crypto()
1849 sslsock->ssl_active = 1; in php_openssl_enable_crypto()
1863 ZVAL_ARR(&meta_arr, capture_session_meta(sslsock->ssl_handle)); in php_openssl_enable_crypto()
1874 peer_cert = SSL_get_peer_certificate(sslsock->ssl_handle); in php_openssl_enable_crypto()
1876 cert_captured = capture_peer_certs(stream, sslsock, peer_cert); in php_openssl_enable_crypto()
1886 } else if (!cparam->inputs.activate && sslsock->ssl_active) { in php_openssl_enable_crypto()
1888 SSL_shutdown(sslsock->ssl_handle); in php_openssl_enable_crypto()
1889 sslsock->ssl_active = 0; in php_openssl_enable_crypto()
1916 php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; in php_openssl_sockop_io() local
1919 if (sslsock->ssl_active) { in php_openssl_sockop_io()
1923 int began_blocked = sslsock->s.is_blocked; in php_openssl_sockop_io()
1934 timeout = &sslsock->s.timeout; in php_openssl_sockop_io()
1937 if (timeout && php_set_sock_blocking(sslsock->s.socket, 0) == SUCCESS) { in php_openssl_sockop_io()
1938 sslsock->s.is_blocked = 0; in php_openssl_sockop_io()
1941 if (!sslsock->s.is_blocked && timeout && (timeout->tv_sec || timeout->tv_usec)) { in php_openssl_sockop_io()
1962 php_set_sock_blocking(sslsock->s.socket, 1); in php_openssl_sockop_io()
1963 sslsock->s.is_blocked = 1; in php_openssl_sockop_io()
1965 sslsock->s.timeout_event = 1; in php_openssl_sockop_io()
1972 nr_bytes = SSL_read(sslsock->ssl_handle, buf, (int)count); in php_openssl_sockop_io()
1974 if (sslsock->reneg && sslsock->reneg->should_close) { in php_openssl_sockop_io()
1982 nr_bytes = SSL_write(sslsock->ssl_handle, buf, (int)count); in php_openssl_sockop_io()
1994 int err = SSL_get_error(sslsock->ssl_handle, nr_bytes ); in php_openssl_sockop_io()
2007 stream->eof = (retry == 0 && errno != EAGAIN && !SSL_pending(sslsock->ssl_handle)); in php_openssl_sockop_io()
2020 php_pollfd_for(sslsock->s.socket, (err == SSL_ERROR_WANT_WRITE) ? in php_openssl_sockop_io()
2023 php_pollfd_for(sslsock->s.socket, (err == SSL_ERROR_WANT_READ) ? in php_openssl_sockop_io()
2029 int err = SSL_get_error(sslsock->ssl_handle, nr_bytes); in php_openssl_sockop_io()
2039 php_pollfd_for(sslsock->s.socket, (err == SSL_ERROR_WANT_WRITE) ? in php_openssl_sockop_io()
2042 php_pollfd_for(sslsock->s.socket, (err == SSL_ERROR_WANT_READ) ? in php_openssl_sockop_io()
2057 if (began_blocked && php_set_sock_blocking(sslsock->s.socket, 1) == SUCCESS) { in php_openssl_sockop_io()
2058 sslsock->s.is_blocked = 1; in php_openssl_sockop_io()
2107 php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; in php_openssl_sockop_close() local
2114 if (sslsock->ssl_active) { in php_openssl_sockop_close()
2115 SSL_shutdown(sslsock->ssl_handle); in php_openssl_sockop_close()
2116 sslsock->ssl_active = 0; in php_openssl_sockop_close()
2118 if (sslsock->ssl_handle) { in php_openssl_sockop_close()
2119 SSL_free(sslsock->ssl_handle); in php_openssl_sockop_close()
2120 sslsock->ssl_handle = NULL; in php_openssl_sockop_close()
2122 if (sslsock->ctx) { in php_openssl_sockop_close()
2123 SSL_CTX_free(sslsock->ctx); in php_openssl_sockop_close()
2124 sslsock->ctx = NULL; in php_openssl_sockop_close()
2127 if (sslsock->alpn_ctx) { in php_openssl_sockop_close()
2128 pefree(sslsock->alpn_ctx->data, php_stream_is_persistent(stream)); in php_openssl_sockop_close()
2129 pefree(sslsock->alpn_ctx, php_stream_is_persistent(stream)); in php_openssl_sockop_close()
2133 if (sslsock->s.socket == -1) in php_openssl_sockop_close()
2134 sslsock->s.socket = SOCK_ERR; in php_openssl_sockop_close()
2136 if (sslsock->s.socket != SOCK_ERR) { in php_openssl_sockop_close()
2139 shutdown(sslsock->s.socket, SHUT_RD); in php_openssl_sockop_close()
2148 n = php_pollfd_for_ms(sslsock->s.socket, POLLOUT, 500); in php_openssl_sockop_close()
2151 closesocket(sslsock->s.socket); in php_openssl_sockop_close()
2152 sslsock->s.socket = SOCK_ERR; in php_openssl_sockop_close()
2156 if (sslsock->sni_certs) { in php_openssl_sockop_close()
2157 for (i = 0; i < sslsock->sni_cert_count; i++) { in php_openssl_sockop_close()
2158 if (sslsock->sni_certs[i].ctx) { in php_openssl_sockop_close()
2159 SSL_CTX_free(sslsock->sni_certs[i].ctx); in php_openssl_sockop_close()
2160 pefree(sslsock->sni_certs[i].name, php_stream_is_persistent(stream)); in php_openssl_sockop_close()
2163 pefree(sslsock->sni_certs, php_stream_is_persistent(stream)); in php_openssl_sockop_close()
2164 sslsock->sni_certs = NULL; in php_openssl_sockop_close()
2167 if (sslsock->url_name) { in php_openssl_sockop_close()
2168 pefree(sslsock->url_name, php_stream_is_persistent(stream)); in php_openssl_sockop_close()
2171 if (sslsock->reneg) { in php_openssl_sockop_close()
2172 pefree(sslsock->reneg, php_stream_is_persistent(stream)); in php_openssl_sockop_close()
2175 pefree(sslsock, php_stream_is_persistent(stream)); in php_openssl_sockop_close()
2258 php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; in php_openssl_sockop_set_option() local
2264 if (sslsock->ssl_active) { in php_openssl_sockop_set_option()
2272 switch (SSL_version(sslsock->ssl_handle)) { in php_openssl_sockop_set_option()
2286 cipher = SSL_get_current_cipher(sslsock->ssl_handle); in php_openssl_sockop_set_option()
2298 SSL_get0_alpn_selected(sslsock->ssl_handle, &alpn_proto, &alpn_proto_len); in php_openssl_sockop_set_option()
2307 add_assoc_bool((zval *)ptrparam, "timed_out", sslsock->s.timeout_event); in php_openssl_sockop_set_option()
2308 add_assoc_bool((zval *)ptrparam, "blocked", sslsock->s.is_blocked); in php_openssl_sockop_set_option()
2320 if (sslsock->s.timeout.tv_sec == -1) { in php_openssl_sockop_set_option()
2328 tv = sslsock->connect_timeout; in php_openssl_sockop_set_option()
2335 if (sslsock->s.socket == -1) { in php_openssl_sockop_set_option()
2337 } else if (php_pollfd_for(sslsock->s.socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) { in php_openssl_sockop_set_option()
2338 if (sslsock->ssl_active) { in php_openssl_sockop_set_option()
2342 n = SSL_peek(sslsock->ssl_handle, &buf, sizeof(buf)); in php_openssl_sockop_set_option()
2344 int err = SSL_get_error(sslsock->ssl_handle, n); in php_openssl_sockop_set_option()
2363 …} else if (0 == recv(sslsock->s.socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGA… in php_openssl_sockop_set_option()
2375 cparam->outputs.returncode = php_openssl_setup_crypto(stream, sslsock, cparam); in php_openssl_sockop_set_option()
2379 cparam->outputs.returncode = php_openssl_enable_crypto(stream, sslsock, cparam); in php_openssl_sockop_set_option()
2398 if ((sslsock->enable_on_connect) && in php_openssl_sockop_set_option()
2403 if (php_stream_xport_crypto_setup(stream, sslsock->method, NULL) < 0 || in php_openssl_sockop_set_option()
2414 xparam->outputs.returncode = php_openssl_tcp_sockop_accept(stream, sslsock, xparam STREAMS_CC); in php_openssl_sockop_set_option()
2430 php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; in php_openssl_sockop_cast() local
2434 if (sslsock->ssl_active) { in php_openssl_sockop_cast()
2438 *ret = fdopen(sslsock->s.socket, stream->mode); in php_openssl_sockop_cast()
2450 && sslsock->ssl_active in php_openssl_sockop_cast()
2451 && (pending = (size_t)SSL_pending(sslsock->ssl_handle)) > 0) { in php_openssl_sockop_cast()
2457 *(php_socket_t *)ret = sslsock->s.socket; in php_openssl_sockop_cast()
2463 if (sslsock->ssl_active) { in php_openssl_sockop_cast()
2467 *(php_socket_t *)ret = sslsock->s.socket; in php_openssl_sockop_cast()
2540 php_openssl_netstream_data_t *sslsock = NULL; in php_openssl_ssl_socket_factory() local
2542 sslsock = pemalloc(sizeof(php_openssl_netstream_data_t), persistent_id ? 1 : 0); in php_openssl_ssl_socket_factory()
2543 memset(sslsock, 0, sizeof(*sslsock)); in php_openssl_ssl_socket_factory()
2545 sslsock->s.is_blocked = 1; in php_openssl_ssl_socket_factory()
2548 sslsock->s.timeout.tv_sec = (long)FG(default_socket_timeout); in php_openssl_ssl_socket_factory()
2550 sslsock->s.timeout.tv_sec = (time_t)FG(default_socket_timeout); in php_openssl_ssl_socket_factory()
2552 sslsock->s.timeout.tv_usec = 0; in php_openssl_ssl_socket_factory()
2555 sslsock->connect_timeout.tv_sec = timeout->tv_sec; in php_openssl_ssl_socket_factory()
2556 sslsock->connect_timeout.tv_usec = timeout->tv_usec; in php_openssl_ssl_socket_factory()
2560 sslsock->s.socket = -1; in php_openssl_ssl_socket_factory()
2563 sslsock->ctx = NULL; in php_openssl_ssl_socket_factory()
2565 stream = php_stream_alloc_rel(&php_openssl_socket_ops, sslsock, persistent_id, "r+"); in php_openssl_ssl_socket_factory()
2568 pefree(sslsock, persistent_id ? 1 : 0); in php_openssl_ssl_socket_factory()
2573 sslsock->enable_on_connect = 1; in php_openssl_ssl_socket_factory()
2574 sslsock->method = get_crypto_method(context, STREAM_CRYPTO_METHOD_ANY_CLIENT); in php_openssl_ssl_socket_factory()
2581 sslsock->enable_on_connect = 1; in php_openssl_ssl_socket_factory()
2582 sslsock->method = STREAM_CRYPTO_METHOD_SSLv3_CLIENT; in php_openssl_ssl_socket_factory()
2589 sslsock->enable_on_connect = 1; in php_openssl_ssl_socket_factory()
2590 sslsock->method = get_crypto_method(context, STREAM_CRYPTO_METHOD_TLS_CLIENT); in php_openssl_ssl_socket_factory()
2592 sslsock->enable_on_connect = 1; in php_openssl_ssl_socket_factory()
2593 sslsock->method = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT; in php_openssl_ssl_socket_factory()
2596 sslsock->enable_on_connect = 1; in php_openssl_ssl_socket_factory()
2597 sslsock->method = STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; in php_openssl_ssl_socket_factory()
2605 sslsock->enable_on_connect = 1; in php_openssl_ssl_socket_factory()
2606 sslsock->method = STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; in php_openssl_ssl_socket_factory()
2614 sslsock->url_name = get_url_name(resourcename, resourcenamelen, !!persistent_id); in php_openssl_ssl_socket_factory()