From affd08cf05d5cd6c200161bc7f741e240ef12105 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Sun, 2 Sep 2012 11:27:04 -0300 Subject: [PATCH] LuaSec 0.3.1 --- CHANGELOG | 10 ++++++++-- INSTALL | 4 ++-- LICENSE | 4 ++-- src/context.c | 4 ++-- src/context.h | 4 ++-- src/ssl.c | 7 +++++-- src/ssl.h | 4 ++-- src/ssl.lua | 6 +++--- 8 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f9ffb6a..902a7e2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,13 +1,19 @@ +-------------------------------------------------------------------------------- +LuaSec 0.3.1 +------------ +- BUG: receive("a") returns 'closed' error instead of the content when the + SSL/TLS connection is shut down cleanly. (thanks Matthias Diener) + -------------------------------------------------------------------------------- LuaSec 0.3 ---------- - Add functions ssl.rawcontext() and ssl.rawconnection() -- Add support to encrypted key password. +- Add support to encrypted key password. (thanks Norbert Kiesel) -------------------------------------------------------------------------------- LuaSec 0.2.1 ------------ -- 'key' and 'certificate' configurations become optional. +- 'key' and 'certificate' configurations become optional. (thanks René Rebe) - Add '_VERSION' variable to module. -------------------------------------------------------------------------------- diff --git a/INSTALL b/INSTALL index 08f9916..2b22ffd 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -LuaSec 0.3 ------------ +LuaSec 0.3.1 +------------ * On Linux, BSD, and Mac OS X: diff --git a/LICENSE b/LICENSE index 28dc94e..10b830e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ -LuaSec 0.3 license -Copyright (C) 2006-2008 Bruno Silvestre +LuaSec 0.3.1 license +Copyright (C) 2006-2009 Bruno Silvestre Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/src/context.c b/src/context.c index 1d39d3c..b99b5af 100644 --- a/src/context.c +++ b/src/context.c @@ -1,6 +1,6 @@ /*-------------------------------------------------------------------------- - * LuaSec 0.3 - * Copyright (C) 2006-2008 Bruno Silvestre + * LuaSec 0.3.1 + * Copyright (C) 2006-2009 Bruno Silvestre * *--------------------------------------------------------------------------*/ diff --git a/src/context.h b/src/context.h index 608f675..47895fe 100644 --- a/src/context.h +++ b/src/context.h @@ -2,8 +2,8 @@ #define __CONTEXT_H__ /*-------------------------------------------------------------------------- - * LuaSec 0.3 - * Copyright (C) 2006-2008 Bruno Silvestre + * LuaSec 0.3.1 + * Copyright (C) 2006-2009 Bruno Silvestre * *--------------------------------------------------------------------------*/ diff --git a/src/ssl.c b/src/ssl.c index 85b9af3..8bdd113 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1,6 +1,6 @@ /*-------------------------------------------------------------------------- - * LuaSec 0.3 - * Copyright (C) 2006-2008 Bruno Silvestre + * LuaSec 0.3.1 + * Copyright (C) 2006-2009 Bruno Silvestre * *--------------------------------------------------------------------------*/ @@ -158,6 +158,9 @@ static int ssl_recv(void *ctx, char *data, size_t count, size_t *got, case SSL_ERROR_NONE: *got = err; return IO_DONE; + case SSL_ERROR_ZERO_RETURN: + *got = err; + return IO_CLOSED; case SSL_ERROR_WANT_READ: err = socket_waitfd(&ssl->sock, WAITFD_R, tm); if (err == IO_TIMEOUT) return IO_SSL; diff --git a/src/ssl.h b/src/ssl.h index a549abf..4dd9831 100644 --- a/src/ssl.h +++ b/src/ssl.h @@ -2,8 +2,8 @@ #define __SSL_H__ /*-------------------------------------------------------------------------- - * LuaSec 0.3 - * Copyright (C) 2006-2008 Bruno Silvestre + * LuaSec 0.3.1 + * Copyright (C) 2006-2009 Bruno Silvestre * *--------------------------------------------------------------------------*/ diff --git a/src/ssl.lua b/src/ssl.lua index 0ee9928..2fb3a1b 100644 --- a/src/ssl.lua +++ b/src/ssl.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------ --- LuaSec 0.3 +-- LuaSec 0.3.1 -- Copyright (C) 2006-2008 Bruno Silvestre -- ------------------------------------------------------------------------------ @@ -10,8 +10,8 @@ require("ssl.core") require("ssl.context") -_VERSION = "0.3" -_COPYRIGHT = "LuaSec 0.3 - Copyright (C) 2006-2008 Bruno Silvestre\n" .. +_VERSION = "0.3.1" +_COPYRIGHT = "LuaSec 0.3.1 - Copyright (C) 2006-2009 Bruno Silvestre\n" .. "LuaSocket 2.0.2 - Copyright (C) 2004-2007 Diego Nehab" -- Export functions