src/context.h

changeset 34
510432315106
parent 0
f7d2d78eb424
child 38
4ecd7b0e67ea
--- a/src/context.h	Sat Nov 20 20:04:11 2010 -0800
+++ b/src/context.h	Sun Nov 21 20:14:31 2010 -0800
@@ -20,12 +20,23 @@
 #define MD_CTX_SERVER 1
 #define MD_CTX_CLIENT 2
 
+#define LUASEC_VERIFY_FLAGS_NONE            0x0000
+#define LUASEC_VERIFY_FLAGS_ALWAYS_CONTINUE 0x0001
+#define LUASEC_VERIFY_FLAGS_IGNORE_PURPOSE  0x0002
+
 typedef struct t_context_ {
   SSL_CTX *context;
+  unsigned int verify_flags;
   char mode;
 } t_context;
 typedef t_context* p_context;
 
+/* index into the SSL storage where the context is.
+ * see SSL_get_ex_data().
+ */
+extern int luasec_ssl_idx;
+
+p_context checkctx(lua_State *L, int idx);
 /* Retrieve the SSL context from the Lua stack */
 SSL_CTX *ctx_getcontext(lua_State *L, int idx);
 /* Retrieve the mode from the context in the Lua stack */

mercurial