mirror of
https://github.com/brunoos/luasec.git
synced 2025-07-17 06:19:46 +02:00
LuaSec 20120616 (unofficial) + patches
This commit is contained in:
25
src/ssl.h
25
src/ssl.h
@ -1,5 +1,5 @@
|
||||
#ifndef __SSL_H__
|
||||
#define __SSL_H__
|
||||
#ifndef LSEC_SSL_H
|
||||
#define LSEC_SSL_H
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* LuaSec 0.4.1
|
||||
@ -10,14 +10,19 @@
|
||||
#include <openssl/ssl.h>
|
||||
#include <lua.h>
|
||||
|
||||
#include "io.h"
|
||||
#include "buffer.h"
|
||||
#include "timeout.h"
|
||||
#include <luasocket/io.h>
|
||||
#include <luasocket/buffer.h>
|
||||
#include <luasocket/timeout.h>
|
||||
#include <luasocket/socket.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "context.h"
|
||||
|
||||
#define ST_SSL_NEW 1
|
||||
#define ST_SSL_CONNECTED 2
|
||||
#define ST_SSL_CLOSED 3
|
||||
#define LSEC_STATE_NEW 1
|
||||
#define LSEC_STATE_CONNECTED 2
|
||||
#define LSEC_STATE_CLOSED 3
|
||||
|
||||
#define LSEC_IO_SSL -100
|
||||
|
||||
typedef struct t_ssl_ {
|
||||
t_socket sock;
|
||||
@ -25,11 +30,11 @@ typedef struct t_ssl_ {
|
||||
t_buffer buf;
|
||||
t_timeout tm;
|
||||
SSL *ssl;
|
||||
char state;
|
||||
int state;
|
||||
int error;
|
||||
} t_ssl;
|
||||
typedef t_ssl* p_ssl;
|
||||
|
||||
LUASEC_API int luaopen_ssl_core(lua_State *L);
|
||||
LSEC_API int luaopen_ssl_core(lua_State *L);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user