Line data Source code
1 :
2 : /*
3 : * Copyright (C) Yichun Zhang (agentzh)
4 : */
5 :
6 :
7 : #ifndef DDEBUG
8 : #define DDEBUG 0
9 : #endif
10 : #include "ddebug.h"
11 :
12 :
13 : #if (NGX_HTTP_SSL)
14 :
15 :
16 : int ngx_http_lua_ssl_ctx_index = -1;
17 :
18 :
19 : ngx_int_t
20 0 : ngx_http_lua_ssl_init(ngx_log_t *log)
21 : {
22 0 : if (ngx_http_lua_ssl_ctx_index == -1) {
23 0 : ngx_http_lua_ssl_ctx_index = SSL_get_ex_new_index(0, NULL, NULL,
24 : NULL, NULL);
25 :
26 0 : if (ngx_http_lua_ssl_ctx_index == -1) {
27 0 : ngx_ssl_error(NGX_LOG_ALERT, log, 0,
28 : "lua: SSL_get_ex_new_index() for ctx failed");
29 0 : return NGX_ERROR;
30 : }
31 : }
32 :
33 0 : return NGX_OK;
34 : }
35 :
36 :
37 : #endif /* NGX_HTTP_SSL */
|