LuaSec Documentation

repository·master·Indexed 19 days ago

https://github.com/lunarmodules/luasec

A security library for Lua that provides SSL/TLS support for network connections by acting as a bridge between LuaSocket and OpenSSL.

Tokens
488
Snippets
0
Records
2
Agent score
14%

What's inside LuaSec

  1. Explore LuaSec sample implementations

    master

    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.