Overview of LuaSec
masterLuaSec is a library designed to add secure connections (SSL/TLS) to Lua applications and scripts. It functions by integrating with LuaSocket and depends on OpenSSL to provide secure networking capabilities.
repository·master·Indexed 19 days ago
https://github.com/lunarmodules/luasecA security library for Lua that provides SSL/TLS support for network connections by acting as a bridge between LuaSocket and OpenSSL.
The samples/ directory contains various implementation examples for testing specific LuaSec features and security protocols. Use these samples to understand how to implement advanced TLS/SSL configurations in Lua.
Key functional areas covered by samples include:
Certificate Management:
certs: Scripts to generate Root CAs, server, and client certificates.chain: Implementing certificate chains during the handshake.multicert: Supporting multiple certificates for dual RSA/ECDSA.digest: Handling certificate digests.verification: Retrieving certificate verification errors from the handshake.verify: Demonstrating how to ignore handshake errors and proceed.Cipher and Protocol Negotiation:
alpn: Testing Application-Layer Protocol Negotiation.curve-negotiation: Testing Elliptic curve negotiation.ecdh: Testing Elliptic curve ciphers.dhparam: Using DH parameters for handshakes.sni: Testing Server Name Indication (SNI) support.psk: Testing Pre-Shared Key (PSK) support.Connection and Lifecycle Management:
oneshot: A basic, simple connection example.loop: Testing successive connections to check for memory leaks.loop-gc: Testing successive connections where the garbage collector handles closing the connection.info: Retrieving information about an active connection.want: Testing the want() method.wantread: Testing timeouts in handshake() and receive().wantwrite: Testing timeouts in send().Integrations and Security:
luaossl: Integration with the luaossl library.key: Testing encrypted private keys.