src/context.h

changeset 34
510432315106
parent 0
f7d2d78eb424
child 38
4ecd7b0e67ea
equal deleted inserted replaced
33:cc36229b3be1 34:510432315106
18 18
19 #define MD_CTX_INVALID 0 19 #define MD_CTX_INVALID 0
20 #define MD_CTX_SERVER 1 20 #define MD_CTX_SERVER 1
21 #define MD_CTX_CLIENT 2 21 #define MD_CTX_CLIENT 2
22 22
23 #define LUASEC_VERIFY_FLAGS_NONE 0x0000
24 #define LUASEC_VERIFY_FLAGS_ALWAYS_CONTINUE 0x0001
25 #define LUASEC_VERIFY_FLAGS_IGNORE_PURPOSE 0x0002
26
23 typedef struct t_context_ { 27 typedef struct t_context_ {
24 SSL_CTX *context; 28 SSL_CTX *context;
29 unsigned int verify_flags;
25 char mode; 30 char mode;
26 } t_context; 31 } t_context;
27 typedef t_context* p_context; 32 typedef t_context* p_context;
28 33
34 /* index into the SSL storage where the context is.
35 * see SSL_get_ex_data().
36 */
37 extern int luasec_ssl_idx;
38
39 p_context checkctx(lua_State *L, int idx);
29 /* Retrieve the SSL context from the Lua stack */ 40 /* Retrieve the SSL context from the Lua stack */
30 SSL_CTX *ctx_getcontext(lua_State *L, int idx); 41 SSL_CTX *ctx_getcontext(lua_State *L, int idx);
31 /* Retrieve the mode from the context in the Lua stack */ 42 /* Retrieve the mode from the context in the Lua stack */
32 char ctx_getmode(lua_State *L, int idx); 43 char ctx_getmode(lua_State *L, int idx);
33 44

mercurial