summaryrefslogtreecommitdiff
path: root/ngx_lua-0.10.28/src/ngx_http_lua_ssl.c
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2025-03-01 12:42:23 +0800
committerkaiwu <kaiwu2004@gmail.com>2025-03-01 12:42:23 +0800
commit3f33461e4948bf05e60bdff35ec6c57a649c7860 (patch)
tree284c2ba95a41536ae1bff6bea710db0709a64739 /ngx_lua-0.10.28/src/ngx_http_lua_ssl.c
downloadopenresty-3f33461e4948bf05e60bdff35ec6c57a649c7860.tar.gz
openresty-3f33461e4948bf05e60bdff35ec6c57a649c7860.zip
openresty bundle
Diffstat (limited to 'ngx_lua-0.10.28/src/ngx_http_lua_ssl.c')
-rw-r--r--ngx_lua-0.10.28/src/ngx_http_lua_ssl.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/ngx_lua-0.10.28/src/ngx_http_lua_ssl.c b/ngx_lua-0.10.28/src/ngx_http_lua_ssl.c
new file mode 100644
index 0000000..8ed7b95
--- /dev/null
+++ b/ngx_lua-0.10.28/src/ngx_http_lua_ssl.c
@@ -0,0 +1,37 @@
+
+/*
+ * Copyright (C) Yichun Zhang (agentzh)
+ */
+
+
+#ifndef DDEBUG
+#define DDEBUG 0
+#endif
+#include "ddebug.h"
+
+
+#if (NGX_HTTP_SSL)
+
+
+int ngx_http_lua_ssl_ctx_index = -1;
+
+
+ngx_int_t
+ngx_http_lua_ssl_init(ngx_log_t *log)
+{
+ if (ngx_http_lua_ssl_ctx_index == -1) {
+ ngx_http_lua_ssl_ctx_index = SSL_get_ex_new_index(0, NULL, NULL,
+ NULL, NULL);
+
+ if (ngx_http_lua_ssl_ctx_index == -1) {
+ ngx_ssl_error(NGX_LOG_ALERT, log, 0,
+ "lua: SSL_get_ex_new_index() for ctx failed");
+ return NGX_ERROR;
+ }
+ }
+
+ return NGX_OK;
+}
+
+
+#endif /* NGX_HTTP_SSL */