6 Commits
ocsp ... v1.0.2

Author SHA1 Message Date
ef14b27a2c Update CHANGELOG 2021-08-14 10:28:09 -03:00
316bea078c Update version to LuaSec 1.0.2 2021-08-14 10:16:35 -03:00
79bbc0bc3e Ignore SSL_OP_BIT(n) macro and update option.c #178 2021-08-02 17:02:44 -03:00
8cba350f37 Update the Lua state reference on the selected SSL context after SNI
Thanks Kim Alvefur
2021-08-02 16:13:12 -03:00
eedebb2477 Merge pull request #176 from linusg/fix-method-name
Fix meth_get_{sinagure => signature}_name function name
2021-07-14 13:05:09 -03:00
c1e28e9132 Fix meth_get_{sinagure => signature}_name function name 2021-07-10 12:47:53 +01:00
19 changed files with 65 additions and 31 deletions

View File

@ -1,3 +1,14 @@
--------------------------------------------------------------------------------
LuaSec 1.0.2
---------------
This version includes:
* Fix handle SSL_send SYSCALL error without errno
* Fix off by one in cert:validat(notafter)
* Fix meth_get_{sinagure => signature}_name function name
* Fix update the Lua state reference on the selected SSL context after SNI
* Fix ignore SSL_OP_BIT(n) macro and update option.c
--------------------------------------------------------------------------------
LuaSec 1.0.1
---------------

View File

@ -1,9 +1,9 @@
LuaSec 1.0.1
LuaSec 1.0.2
------------
* OpenSSL options:
By default, this version includes options for OpenSSL 1.1.1.
By default, this version includes options for OpenSSL 3.0.0 beta2
If you need to generate the options for a different version of OpenSSL:

View File

@ -1,4 +1,4 @@
LuaSec 1.0.1 license
LuaSec 1.0.2 license
Copyright (C) 2006-2021 Bruno Silvestre, UFG
Permission is hereby granted, free of charge, to any person obtaining

View File

@ -1,4 +1,4 @@
LuaSec 1.0.1
LuaSec 1.0.2
===============
LuaSec depends on OpenSSL, and integrates with LuaSocket to make it
easy to add secure connections to any Lua applications or scripts.

View File

@ -1,8 +1,8 @@
package = "LuaSec"
version = "1.0.1-1"
version = "1.0.2-1"
source = {
url = "git://github.com/brunoos/luasec",
tag = "v1.0.1",
tag = "v1.0.2",
}
description = {
summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.",

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2006-2021 Bruno Silvestre
*

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2006-2021 Bruno Silvestre.
*

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann,
* Matthew Wild.

View File

@ -2,7 +2,7 @@
#define LSEC_CONTEXT_H
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2006-2021 Bruno Silvestre
*

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2006-2021 Bruno Silvestre
*

View File

@ -1,5 +1,5 @@
----------------------------------------------------------------------------
-- LuaSec 1.0.1
-- LuaSec 1.0.2
-- Copyright (C) 2009-2021 PUC-Rio
--
-- Author: Pablo Musa
@ -18,8 +18,8 @@ local try = socket.try
-- Module
--
local _M = {
_VERSION = "1.0.1",
_COPYRIGHT = "LuaSec 1.0.1 - Copyright (C) 2009-2021 PUC-Rio",
_VERSION = "1.0.2",
_COPYRIGHT = "LuaSec 1.0.2 - Copyright (C) 2009-2021 PUC-Rio",
PORT = 443,
TIMEOUT = 60
}

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2006-2021 Bruno Silvestre
*
@ -13,13 +13,16 @@
/*
OpenSSL version: OpenSSL 1.1.1
OpenSSL version: OpenSSL 3.0.0-beta2
*/
static lsec_ssl_option_t ssl_options[] = {
#if defined(SSL_OP_ALL)
{"all", SSL_OP_ALL},
#endif
#if defined(SSL_OP_ALLOW_CLIENT_RENEGOTIATION)
{"allow_client_renegotiation", SSL_OP_ALLOW_CLIENT_RENEGOTIATION},
#endif
#if defined(SSL_OP_ALLOW_NO_DHE_KEX)
{"allow_no_dhe_kex", SSL_OP_ALLOW_NO_DHE_KEX},
#endif
@ -32,21 +35,33 @@ static lsec_ssl_option_t ssl_options[] = {
#if defined(SSL_OP_CISCO_ANYCONNECT)
{"cisco_anyconnect", SSL_OP_CISCO_ANYCONNECT},
#endif
#if defined(SSL_OP_CLEANSE_PLAINTEXT)
{"cleanse_plaintext", SSL_OP_CLEANSE_PLAINTEXT},
#endif
#if defined(SSL_OP_COOKIE_EXCHANGE)
{"cookie_exchange", SSL_OP_COOKIE_EXCHANGE},
#endif
#if defined(SSL_OP_CRYPTOPRO_TLSEXT_BUG)
{"cryptopro_tlsext_bug", SSL_OP_CRYPTOPRO_TLSEXT_BUG},
#endif
#if defined(SSL_OP_DISABLE_TLSEXT_CA_NAMES)
{"disable_tlsext_ca_names", SSL_OP_DISABLE_TLSEXT_CA_NAMES},
#endif
#if defined(SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS)
{"dont_insert_empty_fragments", SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS},
#endif
#if defined(SSL_OP_ENABLE_KTLS)
{"enable_ktls", SSL_OP_ENABLE_KTLS},
#endif
#if defined(SSL_OP_ENABLE_MIDDLEBOX_COMPAT)
{"enable_middlebox_compat", SSL_OP_ENABLE_MIDDLEBOX_COMPAT},
#endif
#if defined(SSL_OP_EPHEMERAL_RSA)
{"ephemeral_rsa", SSL_OP_EPHEMERAL_RSA},
#endif
#if defined(SSL_OP_IGNORE_UNEXPECTED_EOF)
{"ignore_unexpected_eof", SSL_OP_IGNORE_UNEXPECTED_EOF},
#endif
#if defined(SSL_OP_LEGACY_SERVER_CONNECT)
{"legacy_server_connect", SSL_OP_LEGACY_SERVER_CONNECT},
#endif
@ -89,6 +104,9 @@ static lsec_ssl_option_t ssl_options[] = {
#if defined(SSL_OP_NO_ENCRYPT_THEN_MAC)
{"no_encrypt_then_mac", SSL_OP_NO_ENCRYPT_THEN_MAC},
#endif
#if defined(SSL_OP_NO_EXTENDED_MASTER_SECRET)
{"no_extended_master_secret", SSL_OP_NO_EXTENDED_MASTER_SECRET},
#endif
#if defined(SSL_OP_NO_QUERY_MTU)
{"no_query_mtu", SSL_OP_NO_QUERY_MTU},
#endif

View File

@ -2,7 +2,7 @@
#define LSEC_OPTIONS_H
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2006-2021 Bruno Silvestre
*

View File

@ -4,7 +4,7 @@ local function usage()
print(" lua options.lua -g /path/to/ssl.h [version] > options.c")
print("* Examples:")
print(" lua options.lua -g /usr/include/openssl/ssl.h > options.c\n")
print(" lua options.lua -g /usr/include/openssl/ssl.h \"OpenSSL 1.0.1 14\" > options.c\n")
print(" lua options.lua -g /usr/include/openssl/ssl.h \"OpenSSL 1.1.1f\" > options.c\n")
print("* List options of your system:")
print(" lua options.lua -l /path/to/ssl.h\n")
@ -18,7 +18,7 @@ end
local function generate(options, version)
print([[
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.1.1
*
* Copyright (C) 2006-2021 Bruno Silvestre
*
@ -60,9 +60,12 @@ local function loadoptions(file)
local options = {}
local f = assert(io.open(file, "r"))
for line in f:lines() do
local op = string.match(line, "define%s+(SSL_OP_%S+)")
if op then
table.insert(options, op)
local op = string.match(line, "define%s+(SSL_OP_BIT%()")
if not op then
op = string.match(line, "define%s+(SSL_OP_%S+)")
if op then
table.insert(options, op)
end
end
end
table.sort(options, function(a,b) return a<b end)

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann,
* Matthew Wild.
@ -747,6 +747,8 @@ static int sni_cb(SSL *ssl, int *ad, void *arg)
lua_pop(L, 4);
/* Found, use this context */
if (newctx) {
p_context pctx = (p_context)SSL_CTX_get_app_data(newctx);
pctx->L = L;
SSL_set_SSL_CTX(ssl, newctx);
return SSL_TLSEXT_ERR_OK;
}
@ -824,7 +826,7 @@ static int meth_getalpn(lua_State *L)
static int meth_copyright(lua_State *L)
{
lua_pushstring(L, "LuaSec 1.0.1 - Copyright (C) 2006-2021 Bruno Silvestre, UFG"
lua_pushstring(L, "LuaSec 1.0.2 - Copyright (C) 2006-2021 Bruno Silvestre, UFG"
#if defined(WITH_LUASOCKET)
"\nLuaSocket 3.0-RC1 - Copyright (C) 2004-2013 Diego Nehab"
#endif

View File

@ -2,7 +2,7 @@
#define LSEC_SSL_H
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2006-2021 Bruno Silvestre
*

View File

@ -1,5 +1,5 @@
------------------------------------------------------------------------------
-- LuaSec 1.0.1
-- LuaSec 1.0.2
--
-- Copyright (C) 2006-2021 Bruno Silvestre
--
@ -271,7 +271,7 @@ core.setmethod("info", info)
--
local _M = {
_VERSION = "1.0.1",
_VERSION = "1.0.2",
_COPYRIGHT = core.copyright(),
config = config,
loadcertificate = x509.load,

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann
* Matthew Wild, Bruno Silvestre.
@ -658,7 +658,7 @@ static int meth_set_encode(lua_State* L)
/**
* Get signature name.
*/
static int meth_get_sinagure_name(lua_State* L)
static int meth_get_signature_name(lua_State* L)
{
p_x509 px = lsec_checkp_x509(L, 1);
int nid = X509_get_signature_nid(px->cert);
@ -698,7 +698,7 @@ static luaL_Reg methods[] = {
{"digest", meth_digest},
{"setencode", meth_set_encode},
{"extensions", meth_extensions},
{"getsignaturename", meth_get_sinagure_name},
{"getsignaturename", meth_get_signature_name},
{"issuer", meth_issuer},
{"notbefore", meth_notbefore},
{"notafter", meth_notafter},

View File

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
* LuaSec 1.0.1
* LuaSec 1.0.2
*
* Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann
* Matthew Wild, Bruno Silvestre.