Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua-luasec for openSUSE:Factory 
checked in at 2021-12-18 20:30:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lua-luasec (Old)
 and      /work/SRC/openSUSE:Factory/.lua-luasec.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lua-luasec"

Sat Dec 18 20:30:20 2021 rev:6 rq:941417 version:1.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/lua-luasec/lua-luasec.changes    2021-02-18 
20:54:23.371550839 +0100
+++ /work/SRC/openSUSE:Factory/.lua-luasec.new.2520/lua-luasec.changes  
2021-12-18 20:31:16.146276633 +0100
@@ -1,0 +2,19 @@
+Sat Dec 18 16:35:00 UTC 2021 - Callum Farmer <gm...@opensuse.org>
+
+- regenerate OpenSSL options for build version
+
+-------------------------------------------------------------------
+Sat Dec 18 15:38:59 UTC 2021 - Callum Farmer <gm...@opensuse.org>
+
+- Update to version 1.0.2:
+  * Fix handle SSL_send SYSCALL error without errno
+  * Fix off by one in cert:validat(notafter)
+  * Fix meth_get_sinagure => meth_get_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
+  * Fix: luaL_Buffer can use the stack and
+    breakbuffer_meth_receive()
+  * Add cert:getsignaturename()
+
+-------------------------------------------------------------------

Old:
----
  luasec-0.9.tar.gz

New:
----
  luasec-1.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lua-luasec.spec ++++++
--- /var/tmp/diff_new_pack.AJ3B5m/_old  2021-12-18 20:31:16.598276884 +0100
+++ /var/tmp/diff_new_pack.AJ3B5m/_new  2021-12-18 20:31:16.602276886 +0100
@@ -16,9 +16,15 @@
 #
 
 
-%define flavor @BUILD_FLAVOR@
+%define flavor @BUILD_FLAVOR@%{nil}
 %define mod_name luasec
-Version:        0.9
+%if "%{flavor}" == ""
+Name:           lua-%{mod_name}
+ExclusiveArch:  do_not_build
+%else
+Name:           %{flavor}-%{mod_name}
+%endif
+Version:        1.0.2
 Release:        0
 Summary:        A Lua binding for OpenSSL
 License:        MIT
@@ -31,12 +37,6 @@
 Requires:       %{flavor}
 Requires:       %{flavor}-luasocket
 %lua_provides
-%if "%{flavor}" == ""
-Name:           lua-%{mod_name}
-ExclusiveArch:  do_not_build
-%else
-Name:           %{flavor}-%{mod_name}
-%endif
 
 %description
 It is a binding for OpenSSL library to provide TLS/SSL communication.
@@ -44,10 +44,15 @@
 session between the peers.
 
 %prep
-%setup -q -n %{mod_name}-%{version}
+%autosetup -n %{mod_name}-%{version}
 
 %build
-make %{?_smp_mflags} linux \
+# regenerate OpenSSL options
+cd src
+lua options.lua -g /usr/include/openssl/ssl.h > options.c
+cd ..
+#
+%make_build linux \
   CFLAGS="%{optflags} -fPIC -I%{lua_incdir} -I. -DWITH_LUASOCKET 
-DLUASOCKET_DEBUG -DLUA_COMPAT_APIINTCASTS"
 
 %install

++++++ luasec-0.9.tar.gz -> luasec-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/CHANGELOG new/luasec-1.0.2/CHANGELOG
--- old/luasec-0.9/CHANGELOG    2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/CHANGELOG  2021-08-14 15:28:09.000000000 +0200
@@ -1,4 +1,31 @@
 
--------------------------------------------------------------------------------
+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
+---------------
+This version includes:
+
+
+* Fix luaL_buffinit() can use the stack and broke buffer_meth_receive()
+
+--------------------------------------------------------------------------------
+LuaSec 1.0
+---------------
+This version includes:
+
+
+* Add cert:getsignaturename()
+
+--------------------------------------------------------------------------------
 LuaSec 0.9
 ---------------
 This version includes:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/INSTALL new/luasec-1.0.2/INSTALL
--- old/luasec-0.9/INSTALL      2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/INSTALL    2021-08-14 15:28:09.000000000 +0200
@@ -1,9 +1,9 @@
-LuaSec 0.9
+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:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/LICENSE new/luasec-1.0.2/LICENSE
--- old/luasec-0.9/LICENSE      2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/LICENSE    2021-08-14 15:28:09.000000000 +0200
@@ -1,5 +1,5 @@
-LuaSec 0.9 license
-Copyright (C) 2006-2019 Bruno Silvestre, UFG
+LuaSec 1.0.2 license
+Copyright (C) 2006-2021 Bruno Silvestre, UFG
 
 Permission is hereby granted, free  of charge, to any person obtaining
 a  copy  of this  software  and  associated  documentation files  (the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/README.md new/luasec-1.0.2/README.md
--- old/luasec-0.9/README.md    2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/README.md  2021-08-14 15:28:09.000000000 +0200
@@ -1,4 +1,4 @@
-LuaSec 0.9
+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.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/luasec-0.9-1.rockspec 
new/luasec-1.0.2/luasec-0.9-1.rockspec
--- old/luasec-0.9/luasec-0.9-1.rockspec        2019-10-31 15:43:53.000000000 
+0100
+++ new/luasec-1.0.2/luasec-0.9-1.rockspec      1970-01-01 01:00:00.000000000 
+0100
@@ -1,105 +0,0 @@
-package = "LuaSec"
-version = "0.9-1"
-source = {
-  url = "git://github.com/brunoos/luasec",
-  tag = "v0.9",
-}
-description = {
-   summary = "A binding for OpenSSL library to provide TLS/SSL communication 
over LuaSocket.",
-   detailed = "This version delegates to LuaSocket the TCP connection 
establishment between the client and server. Then LuaSec uses this connection 
to start a secure TLS/SSL session.",
-   homepage = "https://github.com/brunoos/luasec/wiki";,
-   license = "MIT"
-}
-dependencies = {
-   "lua >= 5.1", "luasocket"
-}
-external_dependencies = {
-   platforms = {
-      unix = {
-         OPENSSL = {
-            header = "openssl/ssl.h",
-            library = "ssl"
-         }
-      },
-      windows = {
-         OPENSSL = {
-            header = "openssl/ssl.h",
-         }
-      },
-   }
-}
-build = {
-   type = "builtin",
-   copy_directories = {
-      "samples"
-   },
-   platforms = {
-      unix = {
-         install = {
-            lib = {
-               "ssl.so"
-            },
-            lua = {
-               "src/ssl.lua", ['ssl.https'] = "src/https.lua"
-            }
-         },
-         modules = {
-            ssl = {
-               defines = {
-                  "WITH_LUASOCKET", "LUASOCKET_DEBUG",
-               },
-               incdirs = {
-                  "$(OPENSSL_INCDIR)", "src/", "src/luasocket",
-               },
-               libdirs = {
-                  "$(OPENSSL_LIBDIR)"
-               },
-               libraries = {
-                  "ssl", "crypto"
-               },
-               sources = {
-                  "src/options.c", "src/config.c", "src/ec.c", 
-                  "src/x509.c", "src/context.c", "src/ssl.c", 
-                  "src/luasocket/buffer.c", "src/luasocket/io.c",
-                  "src/luasocket/timeout.c", "src/luasocket/usocket.c"
-               }
-            }
-         }
-      },
-      windows = {
-         install = {
-            lib = {
-               "ssl.dll"
-            },
-            lua = {
-               "src/ssl.lua", ['ssl.https'] = "src/https.lua"
-            }
-         },
-         modules = {
-            ssl = {
-               defines = {
-                  "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", 
"BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)",
-                  "WITH_LUASOCKET", "LUASOCKET_DEBUG",
-                  "LUASEC_INET_NTOP", "WINVER=0x0501", "_WIN32_WINNT=0x0501", 
"NTDDI_VERSION=0x05010300"
-               },
-               libdirs = {
-                  "$(OPENSSL_LIBDIR)",
-                  "$(OPENSSL_BINDIR)",
-               },
-               libraries = {
-                  "libssl32MD", "libcrypto32MD", "ws2_32"
-               },
-               incdirs = {
-                  "$(OPENSSL_INCDIR)", "src/", "src/luasocket"
-               },
-               sources = {
-                  "src/options.c", "src/config.c", "src/ec.c", 
-                  "src/x509.c", "src/context.c", "src/ssl.c", 
-                  "src/luasocket/buffer.c", "src/luasocket/io.c",
-                  "src/luasocket/timeout.c", "src/luasocket/wsocket.c"
-               }
-            }
-         }
-      }
-   }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/luasec-1.0.2-1.rockspec 
new/luasec-1.0.2/luasec-1.0.2-1.rockspec
--- old/luasec-0.9/luasec-1.0.2-1.rockspec      1970-01-01 01:00:00.000000000 
+0100
+++ new/luasec-1.0.2/luasec-1.0.2-1.rockspec    2021-08-14 15:28:09.000000000 
+0200
@@ -0,0 +1,105 @@
+package = "LuaSec"
+version = "1.0.2-1"
+source = {
+  url = "git://github.com/brunoos/luasec",
+  tag = "v1.0.2",
+}
+description = {
+   summary = "A binding for OpenSSL library to provide TLS/SSL communication 
over LuaSocket.",
+   detailed = "This version delegates to LuaSocket the TCP connection 
establishment between the client and server. Then LuaSec uses this connection 
to start a secure TLS/SSL session.",
+   homepage = "https://github.com/brunoos/luasec/wiki";,
+   license = "MIT"
+}
+dependencies = {
+   "lua >= 5.1", "luasocket"
+}
+external_dependencies = {
+   platforms = {
+      unix = {
+         OPENSSL = {
+            header = "openssl/ssl.h",
+            library = "ssl"
+         }
+      },
+      windows = {
+         OPENSSL = {
+            header = "openssl/ssl.h",
+         }
+      },
+   }
+}
+build = {
+   type = "builtin",
+   copy_directories = {
+      "samples"
+   },
+   platforms = {
+      unix = {
+         install = {
+            lib = {
+               "ssl.so"
+            },
+            lua = {
+               "src/ssl.lua", ['ssl.https'] = "src/https.lua"
+            }
+         },
+         modules = {
+            ssl = {
+               defines = {
+                  "WITH_LUASOCKET", "LUASOCKET_DEBUG",
+               },
+               incdirs = {
+                  "$(OPENSSL_INCDIR)", "src/", "src/luasocket",
+               },
+               libdirs = {
+                  "$(OPENSSL_LIBDIR)"
+               },
+               libraries = {
+                  "ssl", "crypto"
+               },
+               sources = {
+                  "src/options.c", "src/config.c", "src/ec.c", 
+                  "src/x509.c", "src/context.c", "src/ssl.c", 
+                  "src/luasocket/buffer.c", "src/luasocket/io.c",
+                  "src/luasocket/timeout.c", "src/luasocket/usocket.c"
+               }
+            }
+         }
+      },
+      windows = {
+         install = {
+            lib = {
+               "ssl.dll"
+            },
+            lua = {
+               "src/ssl.lua", ['ssl.https'] = "src/https.lua"
+            }
+         },
+         modules = {
+            ssl = {
+               defines = {
+                  "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", 
"BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)",
+                  "WITH_LUASOCKET", "LUASOCKET_DEBUG",
+                  "LUASEC_INET_NTOP", "WINVER=0x0501", "_WIN32_WINNT=0x0501", 
"NTDDI_VERSION=0x05010300"
+               },
+               libdirs = {
+                  "$(OPENSSL_LIBDIR)",
+                  "$(OPENSSL_BINDIR)",
+               },
+               libraries = {
+                  "libssl32MD", "libcrypto32MD", "ws2_32"
+               },
+               incdirs = {
+                  "$(OPENSSL_INCDIR)", "src/", "src/luasocket"
+               },
+               sources = {
+                  "src/options.c", "src/config.c", "src/ec.c", 
+                  "src/x509.c", "src/context.c", "src/ssl.c", 
+                  "src/luasocket/buffer.c", "src/luasocket/io.c",
+                  "src/luasocket/timeout.c", "src/luasocket/wsocket.c"
+               }
+            }
+         }
+      }
+   }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/compat.h new/luasec-1.0.2/src/compat.h
--- old/luasec-0.9/src/compat.h 2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/compat.h       2021-08-14 15:28:09.000000000 +0200
@@ -1,7 +1,7 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2006-2019 Bruno Silvestre
+ * Copyright (C) 2006-2021 Bruno Silvestre
  *
  *--------------------------------------------------------------------------*/
 
@@ -47,5 +47,11 @@
 #endif
 
 
//------------------------------------------------------------------------------
+
+#if !defined(LIBRESSL_VERSION_NUMBER) && ((OPENSSL_VERSION_NUMBER & 
0xFFFFF000L) == 0x10101000L)
+#define LSEC_OPENSSL_1_1_1
+#endif
+
+//------------------------------------------------------------------------------
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/config.c new/luasec-1.0.2/src/config.c
--- old/luasec-0.9/src/config.c 2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/config.c       2021-08-14 15:28:09.000000000 +0200
@@ -1,7 +1,7 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2006-2019 Bruno Silvestre.
+ * Copyright (C) 2006-2021 Bruno Silvestre.
  *
  *--------------------------------------------------------------------------*/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/context.c 
new/luasec-1.0.2/src/context.c
--- old/luasec-0.9/src/context.c        2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/context.c      2021-08-14 15:28:09.000000000 +0200
@@ -1,9 +1,9 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2014-2019 Kim Alvefur, Paul Aurich, Tobias Markmann, 
+ * Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann, 
  *                         Matthew Wild.
- * Copyright (C) 2006-2019 Bruno Silvestre.
+ * Copyright (C) 2006-2021 Bruno Silvestre.
  *
  *--------------------------------------------------------------------------*/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/context.h 
new/luasec-1.0.2/src/context.h
--- old/luasec-0.9/src/context.h        2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/context.h      2021-08-14 15:28:09.000000000 +0200
@@ -2,9 +2,9 @@
 #define LSEC_CONTEXT_H
 
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2006-2019 Bruno Silvestre
+ * Copyright (C) 2006-2021 Bruno Silvestre
  *
  *--------------------------------------------------------------------------*/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/ec.h new/luasec-1.0.2/src/ec.h
--- old/luasec-0.9/src/ec.h     2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/ec.h   2021-08-14 15:28:09.000000000 +0200
@@ -1,7 +1,7 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2006-2019 Bruno Silvestre
+ * Copyright (C) 2006-2021 Bruno Silvestre
  *
  *--------------------------------------------------------------------------*/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/https.lua 
new/luasec-1.0.2/src/https.lua
--- old/luasec-0.9/src/https.lua        2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/https.lua      2021-08-14 15:28:09.000000000 +0200
@@ -1,6 +1,6 @@
 ----------------------------------------------------------------------------
--- LuaSec 0.9
--- Copyright (C) 2009-2019 PUC-Rio
+-- LuaSec 1.0.2
+-- Copyright (C) 2009-2021 PUC-Rio
 --
 -- Author: Pablo Musa
 -- Author: Tomas Guisasola
@@ -18,8 +18,8 @@
 -- Module
 --
 local _M = {
-  _VERSION   = "0.9",
-  _COPYRIGHT = "LuaSec 0.9 - Copyright (C) 2009-2019 PUC-Rio",
+  _VERSION   = "1.0.2",
+  _COPYRIGHT = "LuaSec 1.0.2 - Copyright (C) 2009-2021 PUC-Rio",
   PORT       = 443,
   TIMEOUT    = 60
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/luasocket/buffer.c 
new/luasec-1.0.2/src/luasocket/buffer.c
--- old/luasec-0.9/src/luasocket/buffer.c       2019-10-31 15:43:53.000000000 
+0100
+++ new/luasec-1.0.2/src/luasocket/buffer.c     2021-08-14 15:28:09.000000000 
+0200
@@ -107,10 +107,16 @@
 * object:receive() interface
 \*-------------------------------------------------------------------------*/
 int buffer_meth_receive(lua_State *L, p_buffer buf) {
-    int err = IO_DONE, top = lua_gettop(L);
     luaL_Buffer b;
     size_t size;
-    const char *part = luaL_optlstring(L, 3, "", &size);
+    const char *part;
+    int err = IO_DONE;
+    int top = lua_gettop(L);
+    if (top < 3) {
+        lua_settop(L, 3);
+        top = 3;
+    }
+    part = luaL_optlstring(L, 3, "", &size);
 #ifdef LUASOCKET_DEBUG
     p_timeout tm = timeout_markstart(buf->tm);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/options.c 
new/luasec-1.0.2/src/options.c
--- old/luasec-0.9/src/options.c        2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/options.c      2021-08-14 15:28:09.000000000 +0200
@@ -1,7 +1,7 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2006-2019 Bruno Silvestre
+ * 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 @@
 #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 @@
 #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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/options.h 
new/luasec-1.0.2/src/options.h
--- old/luasec-0.9/src/options.h        2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/options.h      2021-08-14 15:28:09.000000000 +0200
@@ -2,9 +2,9 @@
 #define LSEC_OPTIONS_H
 
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2006-2019 Bruno Silvestre
+ * Copyright (C) 2006-2021 Bruno Silvestre
  *
  *--------------------------------------------------------------------------*/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/options.lua 
new/luasec-1.0.2/src/options.lua
--- old/luasec-0.9/src/options.lua      2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/options.lua    2021-08-14 15:28:09.000000000 +0200
@@ -4,7 +4,7 @@
   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,9 +18,9 @@
 local function generate(options, version)
   print([[
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.1.1
  *
- * Copyright (C) 2006-2019 Bruno Silvestre
+ * Copyright (C) 2006-2021 Bruno Silvestre
  *
  *--------------------------------------------------------------------------*/
 
@@ -60,9 +60,12 @@
   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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/ssl.c new/luasec-1.0.2/src/ssl.c
--- old/luasec-0.9/src/ssl.c    2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/ssl.c  2021-08-14 15:28:09.000000000 +0200
@@ -1,9 +1,9 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2014-2019 Kim Alvefur, Paul Aurich, Tobias Markmann, 
+ * Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann, 
  *                         Matthew Wild.
- * Copyright (C) 2006-2019 Bruno Silvestre.
+ * Copyright (C) 2006-2021 Bruno Silvestre.
  *
  *--------------------------------------------------------------------------*/
 
@@ -48,6 +48,11 @@
 #if defined(WIN32)
   return WSAGetLastError();
 #else
+#if defined(LSEC_OPENSSL_1_1_1)
+  // Bug in OpenSSL 1.1.1
+  if (errno == 0)
+    return LSEC_IO_SSL;
+#endif
   return errno;
 #endif
 }
@@ -742,6 +747,8 @@
   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;
   }
@@ -819,7 +826,7 @@
 
 static int meth_copyright(lua_State *L)
 {
-  lua_pushstring(L, "LuaSec 0.9 - Copyright (C) 2006-2019 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
@@ -941,7 +948,7 @@
   luaL_newlib(L, funcs);
 
   lua_pushstring(L, "SOCKET_INVALID");
-  lua_pushnumber(L, SOCKET_INVALID);
+  lua_pushinteger(L, SOCKET_INVALID);
   lua_rawset(L, -3);
 
   return 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/ssl.h new/luasec-1.0.2/src/ssl.h
--- old/luasec-0.9/src/ssl.h    2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/ssl.h  2021-08-14 15:28:09.000000000 +0200
@@ -2,9 +2,9 @@
 #define LSEC_SSL_H
 
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2006-2019 Bruno Silvestre
+ * Copyright (C) 2006-2021 Bruno Silvestre
  *
  *--------------------------------------------------------------------------*/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/ssl.lua new/luasec-1.0.2/src/ssl.lua
--- old/luasec-0.9/src/ssl.lua  2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/ssl.lua        2021-08-14 15:28:09.000000000 +0200
@@ -1,7 +1,7 @@
 ------------------------------------------------------------------------------
--- LuaSec 0.9
+-- LuaSec 1.0.2
 --
--- Copyright (C) 2006-2019 Bruno Silvestre
+-- Copyright (C) 2006-2021 Bruno Silvestre
 --
 ------------------------------------------------------------------------------
 
@@ -271,7 +271,7 @@
 --
 
 local _M = {
-  _VERSION        = "0.9",
+  _VERSION        = "1.0.2",
   _COPYRIGHT      = core.copyright(),
   config          = config,
   loadcertificate = x509.load,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/x509.c new/luasec-1.0.2/src/x509.c
--- old/luasec-0.9/src/x509.c   2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/x509.c 2021-08-14 15:28:09.000000000 +0200
@@ -1,7 +1,7 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2014-2019 Kim Alvefur, Paul Aurich, Tobias Markmann
+ * Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann
  *                         Matthew Wild, Bruno Silvestre.
  *
  *--------------------------------------------------------------------------*/
@@ -485,10 +485,13 @@
  */
 static int meth_valid_at(lua_State* L)
 {
+  int nb, na;
   X509* cert = lsec_checkx509(L, 1);
   time_t time = luaL_checkinteger(L, 2);
-  lua_pushboolean(L, (X509_cmp_time(X509_get0_notAfter(cert), &time)     >= 0
-                      && X509_cmp_time(X509_get0_notBefore(cert), &time) <= 
0));
+  nb = X509_cmp_time(X509_get0_notBefore(cert), &time);
+  time -= 1;
+  na = X509_cmp_time(X509_get0_notAfter(cert),  &time);
+  lua_pushboolean(L, nb == -1 && na == 1);
   return 1;
 }
 
@@ -652,6 +655,21 @@
   return 1;
 }
 
+/**
+ * Get signature name.
+ */
+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);
+  const char *name = OBJ_nid2sn(nid);
+  if (!name)
+    lua_pushnil(L);
+  else
+    lua_pushstring(L, name);
+  return 1;
+}
+
 /*---------------------------------------------------------------------------*/
 
 static int load_cert(lua_State* L)
@@ -680,6 +698,7 @@
   {"digest",     meth_digest},
   {"setencode",  meth_set_encode},
   {"extensions", meth_extensions},
+  {"getsignaturename", meth_get_signature_name},
   {"issuer",     meth_issuer},
   {"notbefore",  meth_notbefore},
   {"notafter",   meth_notafter},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luasec-0.9/src/x509.h new/luasec-1.0.2/src/x509.h
--- old/luasec-0.9/src/x509.h   2019-10-31 15:43:53.000000000 +0100
+++ new/luasec-1.0.2/src/x509.h 2021-08-14 15:28:09.000000000 +0200
@@ -1,7 +1,7 @@
 /*--------------------------------------------------------------------------
- * LuaSec 0.9
+ * LuaSec 1.0.2
  *
- * Copyright (C) 2014-2019 Kim Alvefur, Paul Aurich, Tobias Markmann
+ * Copyright (C) 2014-2021 Kim Alvefur, Paul Aurich, Tobias Markmann
  *                         Matthew Wild, Bruno Silvestre.
  *
  *--------------------------------------------------------------------------*/

Reply via email to