Twiggy...S::Info(3pm)

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

okay bestie, so this is Twiggy::TLS::Info β€” a little User Contributed Perl Documentation moment β€” and it's giving TLS connection information. that's it, that's the whole vibe. she's here to tell you everything about the TLS handshake that just happened on your connection ✨


🌸 NAME 🌸

Twiggy::TLS::Info β€” literally just TLS connection information, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

so like, inside a PSGI application, you'd do this:

    warn "Client's CommonName: " . $env->{"psgi.tls"}->client_certificate('cn');
    warn "Used cipher: " . $env->{"psgi.tls"}->cipher;

see how she's reaching into $env->{"psgi.tls"}?? that's the girl. she holds all the tea about the TLS connection πŸ‘‘


πŸ’… METHODS πŸ’…

πŸ“ client_certificate

pulls a value out of the client certificate, bestie. if you don't pass a field, you get back the internal representation of the certificate from Net::SSLeay β€” the whole thing, raw, unfiltered.

and if you do wanna know which fields you can ask for?? the full list lives in the IO::Socket::SSL peer_certificate method documentation. go read her, she ate πŸ“–βœ¨

🧚 cipher

returns the string form of the cipher that's being used for the current connection. that's it. that's the method. iconic behaviour, honestly πŸ’œ


🫢 quick reminder babes: no extra lore here, these are the only two methods, so don't go looking for more, iykyk

perl v5.36.0 Β· 2023-01-29 β€” mwah πŸ’‹ that's the version and the date, straight from the source, and that's a wrap on this page. go slay your TLS debugging, bestie πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from