src/ssl.h

Sun, 05 Dec 2010 23:50:19 -0800

author
Paul Aurich <paul@darkrain42.org>
date
Sun, 05 Dec 2010 23:50:19 -0800
changeset 39
3626abd24c59
parent 0
f7d2d78eb424
child 41
e26f1f91118a
permissions
-rw-r--r--

ssl: ssl.h needs to include socket.h

#ifndef __SSL_H__
#define __SSL_H__

/*--------------------------------------------------------------------------
 * LuaSec 0.4
 * Copyright (C) 2006-2009 Bruno Silvestre
 *
 *--------------------------------------------------------------------------*/

#include <openssl/ssl.h>
#include <lua.h>

#include "io.h"
#include "buffer.h"
#include "timeout.h"
#include "socket.h"
#include "context.h"

#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

mercurial