Munin::Common::TLS(3)

πŸ“¦ version 2.0.78, in nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, the manual name up top is Munin::Common::TLS(3) β€” User Contributed Perl Documentation energy ✨ β€” but the NAME line itself says Munin::Node::TLS: the abstract base class implementing the STARTTLS protocol. Yes, those are both literally in there, and yes, we're keeping both. πŸ’…


✨ SYNOPSIS ✨

Do not call this directly, bestie β€” no cap. Go look at the synopsis for Munin::Common::TLSServer and Munin::Common::TLSClient instead. 🫢


πŸŽ€ METHODS πŸŽ€

🌸 new 🌸

my $tls = Munin::Common::TLSFoo->new({ # Substitute Foo with Client or Server
    # Mandatory attributes:
    logger      => \&a_logger_func,
    read_fd     => fileno($socket),
    read_func   => \&a_socket_read_func,
    write_fd    => fileno($socket),
    write_func  => \&a_socket_read_func,

    # Optional attributes                          DEFAULTS
    DEBUG              => 0,                       # 0
    tls_ca_cert        => "path/to/ca/cert.pem",   # ''
    tls_cert           => "path/to/cert.pem",      # ''
    tls_paranoia       => 1,                       # 0
    tls_priv           => "path/to/priv_key.pem",  # ''
    tls_vdepth         => 5,                       # 0
    tls_verify         => 1,                       # 0
});

This is the constructor, and it should not be called directly. What it does document is the attributes that are in common for Munin::Common::TLSServer and Munin::Common::TLSClient. The mandatory ones are logger, read_fd, read_func, write_fd, and write_func; the optional ones and their defaults are right there in the code block, iykyk. πŸ‘‘


πŸ¦‹ read πŸ¦‹

my $msg = $tls->read();

Encrypted read. That's it. That's the whole vibe. πŸ”₯


🌈 write 🌈

$tls->write($msg);

Encrypted write. Slay. πŸ’œ


⭐ session_started ⭐

my $bool = $tls->session_started();

Returns true if the TLS object is ready to read/write encrypted data. Basically the vibe check for "are we encrypted and ready or not." πŸŽ€


mwah πŸ’‹ this page is literally perl v5.42.3, dated 1980-01-01, and the footer manual name is Munin::Common::TLS(3) β€” bye bestie 🫢✨

πŸ“¦ where this page comes from