Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 76) sorted by relevance

1234

/unit/src/
H A Dnxt_sha1.c50 (void) nxt_sha1_body(ctx, ctx->buffer, 64); in nxt_sha1_update()
75 (void) nxt_sha1_body(ctx, ctx->buffer, 64); in nxt_sha1_final()
83 ctx->buffer[56] = (u_char) (ctx->bytes >> 56); in nxt_sha1_final()
84 ctx->buffer[57] = (u_char) (ctx->bytes >> 48); in nxt_sha1_final()
85 ctx->buffer[58] = (u_char) (ctx->bytes >> 40); in nxt_sha1_final()
86 ctx->buffer[59] = (u_char) (ctx->bytes >> 32); in nxt_sha1_final()
87 ctx->buffer[60] = (u_char) (ctx->bytes >> 24); in nxt_sha1_final()
89 ctx->buffer[62] = (u_char) (ctx->bytes >> 8); in nxt_sha1_final()
90 ctx->buffer[63] = (u_char) ctx->bytes; in nxt_sha1_final()
92 (void) nxt_sha1_body(ctx, ctx->buffer, 64); in nxt_sha1_final()
[all …]
H A Dnxt_polarssl.c39 nxt_polarssl_ctx_t *ctx; in nxt_polarssl_server_init() local
45 ctx = nxt_zalloc(sizeof(nxt_polarssl_ctx_t)); in nxt_polarssl_server_init()
46 if (ctx == NULL) { in nxt_polarssl_server_init()
50 n = ssl_init(&ctx->ssl); in nxt_polarssl_server_init()
56 ssl_set_endpoint(&ctx->ssl, SSL_IS_SERVER ); in nxt_polarssl_server_init()
58 conf->ctx = ctx; in nxt_polarssl_server_init()
61 n = x509parse_crtfile(&ctx->certificate, conf->certificate); in nxt_polarssl_server_init()
69 rsa_init(&ctx->key, RSA_PKCS_V15, 0); in nxt_polarssl_server_init()
71 n = x509parse_keyfile(&ctx->key, conf->certificate_key, NULL); in nxt_polarssl_server_init()
79 ssl_set_own_cert(&ctx->ssl, &ctx->certificate, &ctx->key); in nxt_polarssl_server_init()
H A Dnxt_unit.c488 ctx = &lib->main_ctx.ctx; in nxt_unit_init()
566 return ctx; in nxt_unit_init()
700 ctx_impl->req.req.ctx = &ctx_impl->ctx; in nxt_unit_ctx_init()
715 ctx_impl = nxt_container_of(ctx, nxt_unit_ctx_impl_t, ctx); in nxt_unit_ctx_use()
727 ctx_impl = nxt_container_of(ctx, nxt_unit_ctx_impl_t, ctx); in nxt_unit_ctx_release()
1235 ctx_impl = nxt_container_of(ctx, nxt_unit_ctx_impl_t, ctx); in nxt_unit_ctx_ready()
1465 ctx = req->ctx; in nxt_unit_request_check_response_port()
1753 req_impl->req.ctx = ctx; in nxt_unit_request_info_get()
1781 ctx = req->ctx; in nxt_unit_request_info_release()
4085 if (nxt_fast_path(ctx == &ctx_impl->ctx)) { in nxt_unit_awake_ctx()
[all …]
H A Dnxt_http_variables.c11 nxt_str_t *str, void *ctx);
13 nxt_str_t *str, void *ctx);
15 nxt_str_t *str, void *ctx);
42 void *ctx) in nxt_http_var_method() argument
46 r = ctx; in nxt_http_var_method()
56 void *ctx) in nxt_http_var_uri() argument
60 r = ctx; in nxt_http_var_uri()
70 void *ctx) in nxt_http_var_host() argument
74 r = ctx; in nxt_http_var_host()
H A Dnxt_php_sapi.c231 if (nxt_slow_path(ctx == NULL || ctx->req == NULL)) { in PHP_FUNCTION()
259 ctx->req = NULL; in PHP_FUNCTION()
933 nxt_memzero(&ctx, sizeof(ctx)); in nxt_php_request_handler()
935 ctx.req = req; in nxt_php_request_handler()
989 ctx->script_filename.length = ctx->root->length in nxt_php_dynamic_request()
1003 ctx->script_name.start = p + ctx->root->length; in nxt_php_dynamic_request()
1005 p = nxt_cpymem(p, ctx->root->start, ctx->root->length); in nxt_php_dynamic_request()
1014 ctx->chdir = 1; in nxt_php_dynamic_request()
1100 nxt_php_vcwd_chdir(ctx->req, ctx->script_dirname.start);
1193 req = ctx->req;
[all …]
H A Dnxt_http_return.c76 nxt_http_return_ctx_t *ctx; in nxt_http_return() local
102 ctx = NULL; in nxt_http_return()
106 if (nxt_slow_path(ctx == NULL)) { in nxt_http_return()
115 if (ctx != NULL) { in nxt_http_return()
116 ctx->encoded = conf->encoded; in nxt_http_return()
119 nxt_http_return_send_ready(task, r, ctx); in nxt_http_return()
175 nxt_http_return_ctx_t *ctx; in nxt_http_return_send_ready() local
178 ctx = data; in nxt_http_return_send_ready()
180 if (ctx != NULL) { in nxt_http_return_send_ready()
181 if (ctx->location.length > 0) { in nxt_http_return_send_ready()
[all …]
H A Dnxt_http_response.c11 static nxt_int_t nxt_http_response_status(void *ctx, nxt_http_field_t *field,
13 static nxt_int_t nxt_http_response_skip(void *ctx, nxt_http_field_t *field,
15 static nxt_int_t nxt_http_response_field(void *ctx, nxt_http_field_t *field,
45 nxt_http_response_status(void *ctx, nxt_http_field_t *field, in nxt_http_response_status() argument
51 r = ctx; in nxt_http_response_status()
69 nxt_http_response_skip(void *ctx, nxt_http_field_t *field, uintptr_t data) in nxt_http_response_skip() argument
78 nxt_http_response_field(void *ctx, nxt_http_field_t *field, uintptr_t offset) in nxt_http_response_field() argument
82 r = ctx; in nxt_http_response_field()
H A Dnxt_unit.h97 nxt_unit_ctx_t *ctx; member
216 int nxt_unit_run_ctx(nxt_unit_ctx_t *ctx);
218 int nxt_unit_run_shared(nxt_unit_ctx_t *ctx);
229 int nxt_unit_run_once(nxt_unit_ctx_t *ctx);
338 void nxt_unit_free(nxt_unit_ctx_t *ctx, void *p);
366 #define nxt_unit_debug(ctx, fmt, ARGS...) \ argument
374 #define nxt_unit_debug(ctx, fmt, ARGS...) argument
381 #define nxt_unit_warn(ctx, fmt, ARGS...) \ argument
387 #define nxt_unit_error(ctx, fmt, ARGS...) \ argument
388 nxt_unit_log(ctx, NXT_UNIT_LOG_ERR, fmt, ##ARGS)
[all …]
H A Dnxt_websocket_accept.c57 nxt_sha1_t ctx; in nxt_websocket_accept() local
60 nxt_sha1_init(&ctx); in nxt_websocket_accept()
61 nxt_sha1_update(&ctx, key, 24); in nxt_websocket_accept()
62 nxt_sha1_update(&ctx, accept_guid, nxt_length(accept_guid)); in nxt_websocket_accept()
63 nxt_sha1_final(bin_accept, &ctx); in nxt_websocket_accept()
H A Dnxt_java.c72 jobject ctx; member
203 nxt_unit_ctx_t *ctx; in nxt_java_start() local
447 rc = nxt_unit_run(ctx); in nxt_java_start()
449 nxt_java_join_threads(ctx, c); in nxt_java_start()
457 nxt_unit_done(ctx); in nxt_java_start()
484 env = req->ctx->data; in nxt_java_request_handler()
565 env = ws->req->ctx->data; in nxt_java_websocket_handler()
598 env = req->ctx->data; in nxt_java_close_handler()
618 java_data = ctx->unit->data; in nxt_java_ready_handler()
673 (void) nxt_unit_run(ctx); in nxt_java_thread_func()
[all …]
H A Dnxt_sha1.h19 NXT_EXPORT void nxt_sha1_init(nxt_sha1_t *ctx);
20 NXT_EXPORT void nxt_sha1_update(nxt_sha1_t *ctx, const void *data, size_t size);
21 NXT_EXPORT void nxt_sha1_final(u_char result[20], nxt_sha1_t *ctx);
H A Dnxt_http_static.c48 nxt_http_static_ctx_t *ctx);
202 ctx->action = action; in nxt_http_static()
203 ctx->need_body = need_body; in nxt_http_static()
213 nxt_http_static_ctx_t *ctx) in nxt_http_static_iterate() argument
219 conf = ctx->action->u.conf; in nxt_http_static_iterate()
301 ctx = data; in nxt_http_static_send_ready()
302 action = ctx->action; in nxt_http_static_send_ready()
309 shr = &ctx->share; in nxt_http_static_send_ready()
363 chr = &ctx->chroot; in nxt_http_static_send_ready()
661 action = ctx->action; in nxt_http_static_next()
[all …]
H A Dnxt_openssl.c297 SSL_CTX *ctx; in nxt_openssl_server_init() local
303 ctx = SSL_CTX_new(SSLv23_server_method()); in nxt_openssl_server_init()
304 if (ctx == NULL) { in nxt_openssl_server_init()
314 bundle->ctx = ctx; in nxt_openssl_server_init()
397 SSL_CTX_set_verify_depth(ctx, 1); in nxt_openssl_server_init()
438 SSL_CTX_free(ctx); in nxt_openssl_server_init()
569 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx);
1144 SSL_CTX_free(bundle->ctx);
1165 SSL_CTX *ctx; local
1178 ctx = conf->bundle->ctx;
[all …]
H A Dnxt_mem_map.h46 #define nxt_mem_map_file_ctx_t(ctx) argument
49 #define nxt_mem_map(addr, ctx, len, protection, flags, fd, offset) \ argument
53 #define nxt_mem_unmap(addr, ctx, len) \ argument
/unit/test/
H A Dtest_tls_tickets.py57 if ctx is None:
58 ctx = Context(TLSv1_2_METHOD)
60 client = Connection(ctx, sock)
71 ctx,
83 sess, ctx, reused = self.connect()
87 sess, ctx, reused = self.connect(ctx, sess)
109 sess, ctx, _ = self.connect()
128 sess, ctx, _ = self.connect()
146 sess, ctx, _ = self.connect()
153 sess, ctx, _ = self.connect()
[all …]
H A Dtest_tls_session.py48 def connect(self, ctx=None, session=None): argument
51 if ctx is None:
52 ctx = Context(TLSv1_2_METHOD)
54 ctx.set_options(OP_NO_TICKET)
56 client = Connection(ctx, sock)
68 ctx,
73 client, sess, ctx, reused = self.connect()
76 client, _, _, reused = self.connect(ctx, sess)
81 client, sess, ctx, reused = self.connect()
84 client, _, _, reused = self.connect(ctx, sess)
[all …]
H A Dtest_reconfigure_tls.py30 ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
31 ctx.verify_mode = ssl.CERT_NONE
32 ctx.check_hostname = False
35 ssl_sock = ctx.wrap_socket(
/unit/src/test/
H A Dnxt_unit_app_test.c48 nxt_unit_ctx_t *ctx; in main() local
60 ctx = nxt_unit_init(&init); in main()
61 if (ctx == NULL) { in main()
65 err = nxt_unit_run(ctx); in main()
85 nxt_unit_done(ctx); in main()
94 ready_handler(nxt_unit_ctx_t *ctx) in ready_handler() argument
98 nxt_unit_debug(ctx, "ready"); in ready_handler()
124 nxt_unit_ctx_t *ctx; in worker() local
127 if (ctx == NULL) { in worker()
133 rc = nxt_unit_run(ctx); in worker()
[all …]
H A Dnxt_unit_websocket_echo.c88 nxt_unit_ctx_t *ctx; in main() local
96 ctx = nxt_unit_init(&init); in main()
97 if (ctx == NULL) { in main()
101 nxt_unit_run(ctx); in main()
102 nxt_unit_done(ctx); in main()
/unit/go/
H A Dnxt_cgo_lib.c13 static ssize_t nxt_cgo_port_send(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port,
15 static ssize_t nxt_cgo_port_recv(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port,
22 nxt_unit_ctx_t *ctx; in nxt_cgo_run() local
37 ctx = nxt_unit_init(&init); in nxt_cgo_run()
38 if (ctx == NULL) { in nxt_cgo_run()
42 rc = nxt_unit_run_ctx(ctx); in nxt_cgo_run()
44 nxt_unit_done(ctx); in nxt_cgo_run()
51 nxt_cgo_port_send(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port, in nxt_cgo_port_send() argument
60 nxt_cgo_port_recv(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port, in nxt_cgo_port_recv() argument
/unit/src/java/
H A Dnxt_jni_Context.c112 nxt_java_service(JNIEnv *env, jobject ctx, jobject jreq, jobject jresp) in nxt_java_service() argument
114 (*env)->CallVoidMethod(env, ctx, nxt_java_Context_service, jreq, jresp); in nxt_java_service()
119 nxt_java_stopContext(JNIEnv *env, jobject ctx) in nxt_java_stopContext() argument
121 (*env)->CallVoidMethod(env, ctx, nxt_java_Context_stop); in nxt_java_stopContext()
130 nxt_unit_ctx_t *ctx; in nxt_java_Context_log() local
132 ctx = nxt_jlong2ptr(ctx_ptr); in nxt_java_Context_log()
139 nxt_unit_log(ctx, NXT_UNIT_LOG_INFO, "%.*s", msg_len, msg_str); in nxt_java_Context_log()
151 nxt_unit_ctx_t *ctx; in nxt_java_Context_trace() local
153 ctx = nxt_jlong2ptr(ctx_ptr); in nxt_java_Context_trace()
160 nxt_unit_debug(ctx, "%.*s", msg_len, msg_str); in nxt_java_Context_trace()
/unit/src/python/
H A Dnxt_python_asgi.c356 ctx_data = ctx->data; in nxt_python_asgi_run()
385 ctx_data = ctx->data; in nxt_py_asgi_remove_reader()
909 nxt_unit_debug(ctx, "asgi_add_port %d %p %p", port->in_fd, ctx, port); in nxt_py_asgi_add_port()
922 nxt_unit_debug(ctx, "asgi_add_reader %d %p %p", port->in_fd, ctx, port); in nxt_py_asgi_add_reader()
924 ctx_data = ctx->data; in nxt_py_asgi_add_reader()
999 nxt_unit_debug(ctx, "asgi_quit %p", ctx); in nxt_py_asgi_quit()
1084 nxt_unit_debug(ctx, "asgi_port_read(%p,%p): %d", ctx, port, rc); in nxt_py_asgi_port_read()
1185 ctx = data; in nxt_py_asgi_calc_size()
1187 ctx->fields_count++; in nxt_py_asgi_calc_size()
1210 ctx = data; in nxt_py_asgi_add_field()
[all …]
H A Dnxt_python.c20 nxt_unit_ctx_t *ctx; member
31 static int nxt_python_ready_handler(nxt_unit_ctx_t *ctx);
33 static void nxt_python_join_threads(nxt_unit_ctx_t *ctx,
508 nxt_python_ready_handler(nxt_unit_ctx_t *ctx) in nxt_python_ready_handler() argument
515 c = ctx->unit->data; in nxt_python_ready_handler()
524 ti->ctx = ctx; in nxt_python_ready_handler()
545 nxt_unit_ctx_t *ctx; in nxt_python_thread_func() local
562 ctx = nxt_unit_ctx_alloc(ti->ctx, ti->ctx_data); in nxt_python_thread_func()
563 if (nxt_slow_path(ctx == NULL)) { in nxt_python_thread_func()
567 (void) nxt_py_proto.run(ctx); in nxt_python_thread_func()
[all …]
/unit/test/java/path_translation/
H A Dapp.java32 ServletContext ctx = request.getServletContext(); in doGet() local
37 response.addHeader("X-Real-Path", "" + ctx.getRealPath(path)); in doGet()
38 response.addHeader("X-Resource", "" + ctx.getResource(path)); in doGet()
40 Set<String> paths = ctx.getResourcePaths(path); in doGet()
44 InputStream is = ctx.getResourceAsStream(path); in doGet()
/unit/src/nodejs/unit-http/
H A Dunit.h40 static void shm_ack_handler_cb(nxt_unit_ctx_t *ctx);
41 void shm_ack_handler(nxt_unit_ctx_t *ctx);
43 static int add_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port);
44 static void remove_port(nxt_unit_t *unit, nxt_unit_ctx_t *ctx,
47 static void quit_cb(nxt_unit_ctx_t *ctx);
48 void quit(nxt_unit_ctx_t *ctx);

1234