mirror of
https://github.com/brunoos/luasec.git
synced 2025-04-24 01:16:45 +02:00
Compare commits
No commits in common. "fddde111f7fe9ad5417d75ebbd70429d13eaad97" and "c297c5204ca6aa8eb15ce0c5ddb3bbfef0e66169" have entirely different histories.
fddde111f7
...
c297c5204c
@ -1,10 +1,3 @@
|
|||||||
--------------------------------------------------------------------------------
|
|
||||||
LuaSec 1.3.1
|
|
||||||
---------------
|
|
||||||
This version includes:
|
|
||||||
|
|
||||||
* Fix: check if PSK is available
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
LuaSec 1.3.0
|
LuaSec 1.3.0
|
||||||
---------------
|
---------------
|
||||||
|
2
INSTALL
2
INSTALL
@ -1,4 +1,4 @@
|
|||||||
LuaSec 1.3.1
|
LuaSec 1.3.0
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* OpenSSL options:
|
* OpenSSL options:
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
|||||||
LuaSec 1.3.1 license
|
LuaSec 1.3.0 license
|
||||||
Copyright (C) 2006-2023 Bruno Silvestre, UFG
|
Copyright (C) 2006-2023 Bruno Silvestre, UFG
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
LuaSec 1.3.1
|
LuaSec 1.3.0
|
||||||
===============
|
===============
|
||||||
LuaSec depends on OpenSSL, and integrates with LuaSocket to make it
|
LuaSec depends on OpenSSL, and integrates with LuaSocket to make it
|
||||||
easy to add secure connections to any Lua applications or scripts.
|
easy to add secure connections to any Lua applications or scripts.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package = "LuaSec"
|
package = "LuaSec"
|
||||||
version = "1.3.1-1"
|
version = "1.3.0-1"
|
||||||
source = {
|
source = {
|
||||||
url = "git+https://github.com/brunoos/luasec",
|
url = "git+https://github.com/brunoos/luasec",
|
||||||
tag = "v1.3.1",
|
tag = "v1.3.0",
|
||||||
}
|
}
|
||||||
description = {
|
description = {
|
||||||
summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.",
|
summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.",
|
@ -4,11 +4,6 @@
|
|||||||
local socket = require("socket")
|
local socket = require("socket")
|
||||||
local ssl = require("ssl")
|
local ssl = require("ssl")
|
||||||
|
|
||||||
if not ssl.config.capabilities.psk then
|
|
||||||
print("[ERRO] PSK not available")
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- @param hint (nil | string)
|
-- @param hint (nil | string)
|
||||||
-- @param max_identity_len (number)
|
-- @param max_identity_len (number)
|
||||||
-- @param max_psk_len (number)
|
-- @param max_psk_len (number)
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
local socket = require("socket")
|
local socket = require("socket")
|
||||||
local ssl = require("ssl")
|
local ssl = require("ssl")
|
||||||
|
|
||||||
if not ssl.config.capabilities.psk then
|
|
||||||
print("[ERRO] PSK not available")
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- @param identity (string)
|
-- @param identity (string)
|
||||||
-- @param max_psk_len (number)
|
-- @param max_psk_len (number)
|
||||||
-- @return psk (string)
|
-- @return psk (string)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
@ -54,10 +54,4 @@
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_NO_PSK)
|
|
||||||
#define LSEC_ENABLE_PSK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
@ -74,12 +74,6 @@ LSEC_API int luaopen_ssl_config(lua_State *L)
|
|||||||
lua_pushboolean(L, 1);
|
lua_pushboolean(L, 1);
|
||||||
lua_rawset(L, -3);
|
lua_rawset(L, -3);
|
||||||
|
|
||||||
#ifdef LSEC_ENABLE_PSK
|
|
||||||
lua_pushstring(L, "psk");
|
|
||||||
lua_pushboolean(L, 1);
|
|
||||||
lua_rawset(L, -3);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LSEC_ENABLE_DANE
|
#ifdef LSEC_ENABLE_DANE
|
||||||
// DANE
|
// DANE
|
||||||
lua_pushstring(L, "dane");
|
lua_pushstring(L, "dane");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
@ -707,7 +707,6 @@ static int set_alpn_cb(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(LSEC_ENABLE_PSK)
|
|
||||||
/**
|
/**
|
||||||
* Callback to select the PSK.
|
* Callback to select the PSK.
|
||||||
*/
|
*/
|
||||||
@ -842,7 +841,6 @@ static int set_client_psk_cb(lua_State *L) {
|
|||||||
lua_pushboolean(L, 1);
|
lua_pushboolean(L, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LSEC_ENABLE_DANE)
|
#if defined(LSEC_ENABLE_DANE)
|
||||||
/*
|
/*
|
||||||
@ -895,11 +893,9 @@ static luaL_Reg funcs[] = {
|
|||||||
{"setdhparam", set_dhparam},
|
{"setdhparam", set_dhparam},
|
||||||
{"setverify", set_verify},
|
{"setverify", set_verify},
|
||||||
{"setoptions", set_options},
|
{"setoptions", set_options},
|
||||||
#if defined(LSEC_ENABLE_PSK)
|
|
||||||
{"setpskhint", set_psk_identity_hint},
|
{"setpskhint", set_psk_identity_hint},
|
||||||
{"setserverpskcb", set_server_psk_cb},
|
{"setserverpskcb", set_server_psk_cb},
|
||||||
{"setclientpskcb", set_client_psk_cb},
|
{"setclientpskcb", set_client_psk_cb},
|
||||||
#endif
|
|
||||||
{"setmode", set_mode},
|
{"setmode", set_mode},
|
||||||
#if !defined(OPENSSL_NO_EC)
|
#if !defined(OPENSSL_NO_EC)
|
||||||
{"setcurve", set_curve},
|
{"setcurve", set_curve},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define LSEC_CONTEXT_H
|
#define LSEC_CONTEXT_H
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
|
2
src/ec.c
2
src/ec.c
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
|
2
src/ec.h
2
src/ec.h
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaSec 1.3.1
|
-- LuaSec 1.3.0
|
||||||
--
|
--
|
||||||
-- Copyright (C) 2009-2023 PUC-Rio
|
-- Copyright (C) 2009-2023 PUC-Rio
|
||||||
--
|
--
|
||||||
@ -19,8 +19,8 @@ local try = socket.try
|
|||||||
-- Module
|
-- Module
|
||||||
--
|
--
|
||||||
local _M = {
|
local _M = {
|
||||||
_VERSION = "1.3.1",
|
_VERSION = "1.3.0",
|
||||||
_COPYRIGHT = "LuaSec 1.3.1 - Copyright (C) 2009-2023 PUC-Rio",
|
_COPYRIGHT = "LuaSec 1.3.0 - Copyright (C) 2009-2023 PUC-Rio",
|
||||||
PORT = 443,
|
PORT = 443,
|
||||||
TIMEOUT = 60
|
TIMEOUT = 60
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define LSEC_OPTIONS_H
|
#define LSEC_OPTIONS_H
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
|
@ -18,7 +18,7 @@ end
|
|||||||
local function generate(options, version)
|
local function generate(options, version)
|
||||||
print([[
|
print([[
|
||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
@ -947,7 +947,7 @@ static int meth_getalpn(lua_State *L)
|
|||||||
|
|
||||||
static int meth_copyright(lua_State *L)
|
static int meth_copyright(lua_State *L)
|
||||||
{
|
{
|
||||||
lua_pushstring(L, "LuaSec 1.3.1 - Copyright (C) 2006-2023 Bruno Silvestre, UFG"
|
lua_pushstring(L, "LuaSec 1.3.0 - Copyright (C) 2006-2023 Bruno Silvestre, UFG"
|
||||||
#if defined(WITH_LUASOCKET)
|
#if defined(WITH_LUASOCKET)
|
||||||
"\nLuaSocket 3.0-RC1 - Copyright (C) 2004-2013 Diego Nehab"
|
"\nLuaSocket 3.0-RC1 - Copyright (C) 2004-2013 Diego Nehab"
|
||||||
#endif
|
#endif
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define LSEC_SSL_H
|
#define LSEC_SSL_H
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 Bruno Silvestre
|
* Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
-- LuaSec 1.3.1
|
-- LuaSec 1.3.0
|
||||||
--
|
--
|
||||||
-- Copyright (C) 2006-2023 Bruno Silvestre
|
-- Copyright (C) 2006-2023 Bruno Silvestre
|
||||||
--
|
--
|
||||||
@ -202,7 +202,7 @@ local function newcontext(cfg)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- PSK
|
-- PSK
|
||||||
if config.capabilities.psk and cfg.psk then
|
if cfg.psk then
|
||||||
if cfg.mode == "client" then
|
if cfg.mode == "client" then
|
||||||
if type(cfg.psk) ~= "function" then
|
if type(cfg.psk) ~= "function" then
|
||||||
return nil, "invalid PSK configuration"
|
return nil, "invalid PSK configuration"
|
||||||
@ -302,7 +302,7 @@ core.setmethod("info", info)
|
|||||||
--
|
--
|
||||||
|
|
||||||
local _M = {
|
local _M = {
|
||||||
_VERSION = "1.3.1",
|
_VERSION = "1.3.0",
|
||||||
_COPYRIGHT = core.copyright(),
|
_COPYRIGHT = core.copyright(),
|
||||||
config = config,
|
config = config,
|
||||||
loadcertificate = x509.load,
|
loadcertificate = x509.load,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
||||||
* Copyright (C) 2014-2023 Bruno Silvestre
|
* Copyright (C) 2014-2023 Bruno Silvestre
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
* LuaSec 1.3.1
|
* LuaSec 1.3.0
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
* Copyright (C) 2014-2023 Kim Alvefur, Paul Aurich, Tobias Markmann, Matthew Wild
|
||||||
* Copyright (C) 2013-2023 Bruno Silvestre
|
* Copyright (C) 2013-2023 Bruno Silvestre
|
||||||
|
Loading…
x
Reference in New Issue
Block a user