Twiggy::TLS(3pm)

πŸ’– Twiggy::TLS πŸ’–

okay so bestie, this is a page from the User Contributed Perl Documentation for Twiggy::TLS β€” the module that lets your Twiggy server speak TLS. no cap, it's a whole glow-up for your plain old HTTP situation. πŸ¦‹


✨ NAME ✨

Twiggy::TLS β€” Twiggy server with TLS support. that's it, that's the vibe. πŸ”


🌸 SYNOPSIS 🌸

like, the fastest way in is straight from the command line:

twiggy --server Twiggy::TLS --tls-key key.pem --tls-cert cert.pem

peep "ATTRIBUTES" down below for the whole tea. β˜•

or if you're doing the whole programmatic main-character thing:

use Twiggy::Server::TLS;

my $server = Twiggy::Server::TLS->new(
    host     => $host,
    port     => $port,
    tls_key  => $key_filename,
    tls_cert => $cert_filename
);
$server->register_service($app);

AE::cv->recv;

she's literally built different. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

Twiggy::TLS extends Twiggy with TLS support. that's the whole plot. Twiggy but encrypted. iconic behaviour, honestly. ✨


πŸ‘‘ ATTRIBUTES πŸ‘‘

first things first, the rule that applies to all of these: every file has to be in PEM format. and yes bestie, you can merge multiple entities into a single file β€” like your server key and your certificate can share one file, no drama. 🫢

πŸ’œ tls_version

sets the version of the SSL protocol used to transmit data. the default is SSLv23:!SSLv2. wanna know what else you can throw in there? go check out "SSL_version" in IO::Socket::SSL. that's where the full menu lives. πŸ“œ

πŸ’œ tls_ciphers

this one describes the list of cipher suites your server supports for establishing a secure connection. cipher suites get specified in the OpenSSL cipherlist format β€” http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS if you wanna read up. πŸ“–

the default is HIGH:!aNULL:!MD5. periodt.

πŸ’œ tls_key

path to the server private key file. πŸ”‘

πŸ’œ tls_cert

path to the server certificate file. πŸ“œ

πŸ’œ tls_verify

this one controls the verification of the peer identity. the possible values are, and I need you to focus:

  • off β€” the default. disables peer verification. just... not checking. living dangerously, lowkey.
  • on β€” requests the peer certificate and verifies it against the CA. you can specify the CA certificate with the tls_ca option. responsible queen behaviour. πŸ‘‘
  • optional β€” same as on, but it allows users that have not passed verification. it's giving "we're checking but we're not gonna be weird about it". πŸ™ˆ

πŸ’œ tls_ca

path to the file that contains the CA certificate. used for peer verification. πŸ›οΈ


🌈 TLS INFORMATION 🌈

the TLS connection info gets stored in the environment key psgi.tls. so if you need the deets, that's where they're living. check out Twiggy::TLS::Info for the whole story. πŸ’«


πŸ”₯ DEBUGGING πŸ”₯

when things are being weird and you need answers, set the TWIGGY_DEBUG environment variable and you'll get diagnostic information. your bestie telling you what's actually going on. 😭✨


πŸ’€ LICENSE πŸ’€

this module is licensed under the same terms as Perl itself. πŸͺ


🌟 AUTHOR 🌟

Serhii Zasenko 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

  • Twiggy β€” the original, the blueprint, the moment.

and that's the page bestie!! this one's from perl v5.36.0, dated 2023-01-29. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from