Lines Matching refs:ssl_handle
146 SSL *ssl_handle; member
190 int err = SSL_get_error(sslsock->ssl_handle, nr_bytes); in handle_ssl_error()
215 SSL_set_shutdown(sslsock->ssl_handle, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); in handle_ssl_error()
1153 SSL_set_info_callback(sslsock->ssl_handle, info_callback); in init_server_reneg_limit()
1305 static int server_sni_callback(SSL *ssl_handle, int *al, void *arg) /* {{{ */ in server_sni_callback() argument
1312 server_name = SSL_get_servername(ssl_handle, TLSEXT_NAMETYPE_host_name); in server_sni_callback()
1318 stream = (php_stream*)SSL_get_ex_data(ssl_handle, php_openssl_get_ssl_stream_data_index()); in server_sni_callback()
1327 SSL_set_SSL_CTX(ssl_handle, sslsock->sni_certs[i].ctx); in server_sni_callback()
1441 SSL_set_tlsext_host_name(sslsock->ssl_handle, sni_server_name); in enable_client_sni()
1490 static int server_alpn_callback(SSL *ssl_handle, const unsigned char **out, unsigned char *outlen, in server_alpn_callback() argument
1518 if (sslsock->ssl_handle) { in php_openssl_setup_crypto()
1644 sslsock->ssl_handle = SSL_new(sslsock->ctx); in php_openssl_setup_crypto()
1646 if (sslsock->ssl_handle == NULL) { in php_openssl_setup_crypto()
1659 SSL_set_ex_data(sslsock->ssl_handle, php_openssl_get_ssl_stream_data_index(), stream); in php_openssl_setup_crypto()
1662 if (!SSL_set_fd(sslsock->ssl_handle, sslsock->s.socket)) { in php_openssl_setup_crypto()
1679 SSL_set_mode(sslsock->ssl_handle, SSL_get_mode(sslsock->ssl_handle) | SSL_MODE_RELEASE_BUFFERS); in php_openssl_setup_crypto()
1685 …} else if (((php_openssl_netstream_data_t*)cparam->inputs.session->abstract)->ssl_handle == NULL) { in php_openssl_setup_crypto()
1688 …SSL_copy_session_id(sslsock->ssl_handle, ((php_openssl_netstream_data_t*)cparam->inputs.session->a… in php_openssl_setup_crypto()
1696 static zend_array *capture_session_meta(SSL *ssl_handle) /* {{{ */ in capture_session_meta() argument
1700 long proto = SSL_version(ssl_handle); in capture_session_meta()
1701 const SSL_CIPHER *cipher = SSL_get_current_cipher(ssl_handle); in capture_session_meta()
1763 chain = SSL_get_peer_cert_chain(sslsock->ssl_handle); in capture_peer_certs()
1811 SSL_set_connect_state(sslsock->ssl_handle); in php_openssl_enable_crypto()
1813 SSL_set_accept_state(sslsock->ssl_handle); in php_openssl_enable_crypto()
1823 sslsock->ssl_handle, in php_openssl_enable_crypto()
1825 SSL_get_mode(sslsock->ssl_handle) | in php_openssl_enable_crypto()
1844 n = SSL_connect(sslsock->ssl_handle); in php_openssl_enable_crypto()
1846 n = SSL_accept(sslsock->ssl_handle); in php_openssl_enable_crypto()
1865 int err = SSL_get_error(sslsock->ssl_handle, n); in php_openssl_enable_crypto()
1884 peer_cert = SSL_get_peer_certificate(sslsock->ssl_handle); in php_openssl_enable_crypto()
1889 if (FAILURE == apply_peer_verification_policy(sslsock->ssl_handle, peer_cert, stream)) { in php_openssl_enable_crypto()
1890 SSL_shutdown(sslsock->ssl_handle); in php_openssl_enable_crypto()
1907 ZVAL_ARR(&meta_arr, capture_session_meta(sslsock->ssl_handle)); in php_openssl_enable_crypto()
1918 peer_cert = SSL_get_peer_certificate(sslsock->ssl_handle); in php_openssl_enable_crypto()
1932 SSL_shutdown(sslsock->ssl_handle); in php_openssl_enable_crypto()
2016 nr_bytes = SSL_read(sslsock->ssl_handle, buf, (int)count); in php_openssl_sockop_io()
2026 nr_bytes = SSL_write(sslsock->ssl_handle, buf, (int)count); in php_openssl_sockop_io()
2038 int err = SSL_get_error(sslsock->ssl_handle, nr_bytes ); in php_openssl_sockop_io()
2051 stream->eof = (retry == 0 && errno != EAGAIN && !SSL_pending(sslsock->ssl_handle)); in php_openssl_sockop_io()
2073 int err = SSL_get_error(sslsock->ssl_handle, nr_bytes); in php_openssl_sockop_io()
2159 SSL_shutdown(sslsock->ssl_handle); in php_openssl_sockop_close()
2162 if (sslsock->ssl_handle) { in php_openssl_sockop_close()
2163 SSL_free(sslsock->ssl_handle); in php_openssl_sockop_close()
2164 sslsock->ssl_handle = NULL; in php_openssl_sockop_close()
2316 switch (SSL_version(sslsock->ssl_handle)) { in php_openssl_sockop_set_option()
2333 cipher = SSL_get_current_cipher(sslsock->ssl_handle); in php_openssl_sockop_set_option()
2345 SSL_get0_alpn_selected(sslsock->ssl_handle, &alpn_proto, &alpn_proto_len); in php_openssl_sockop_set_option()
2389 n = SSL_peek(sslsock->ssl_handle, &buf, sizeof(buf)); in php_openssl_sockop_set_option()
2391 int err = SSL_get_error(sslsock->ssl_handle, n); in php_openssl_sockop_set_option()
2498 && (pending = (size_t)SSL_pending(sslsock->ssl_handle)) > 0) { in php_openssl_sockop_cast()