luasec/src/ssl.h

36 lines
668 B
C
Raw Normal View History

2012-09-02 16:15:49 +02:00
#ifndef __SSL_H__
#define __SSL_H__
/*--------------------------------------------------------------------------
2012-09-02 16:32:26 +02:00
* LuaSec 0.4
2012-09-02 16:27:04 +02:00
* Copyright (C) 2006-2009 Bruno Silvestre
2012-09-02 16:15:49 +02:00
*
*--------------------------------------------------------------------------*/
#include <openssl/ssl.h>
#include <lua.h>
#include "io.h"
#include "buffer.h"
#include "timeout.h"
2012-09-02 16:32:26 +02:00
#include "context.h"
2012-09-02 16:15:49 +02:00
#define ST_SSL_NEW 1
#define ST_SSL_CONNECTED 2
#define ST_SSL_CLOSED 3
typedef struct t_ssl_ {
t_socket sock;
t_io io;
t_buffer buf;
t_timeout tm;
SSL *ssl;
char state;
int error;
} t_ssl;
typedef t_ssl* p_ssl;
LUASEC_API int luaopen_ssl_core(lua_State *L);
#endif