Authen:...l::x509(3)
π Authen::Credential::x509 β the manual, but make it cute β¨
okay bestie, welcome to section 3 of the manual pages, and today's main character is Authen::Credential::x509 π she's a little helper module, she's got a whole personality, and she's here to make X.509 credentials make sense. periodt.
πΈ NAME πΈ
Authen::Credential::x509 β an abstraction of an X.509 credential. it's giving "I hold your cert stuff so you don't have to" π
π¦ DESCRIPTION π¦
so this is a helper module for Authen::Credential, and what it does is implement an X.509 credential. if you wanna know what X.509 even is, the original is like, go read <http://en.wikipedia.org/wiki/X.509> β that's the vibe check source right there.
it supports the following attributes, and yes, we're listing every single one, no skipping π ββοΈ
certβ the path of the file holding the certificate. that's the whole point bestie, it's literally in the name πkeyβ the path of the file holding the private key. guard this one with your life fr fr π₯passβ the pass-phrase protecting the private key. it's optional! β¨caβ the path of the directory containing trusted certificates. also optional πca_fileβ the path of the file that contains the trusted certificate. optional too π
and it supports the following targets for the prepare() method:
IO::Socket::SSLβ it returns a reference to a hash containing the suitable options forIO::Socket::SSL. like, you ask nicely, it hands you a hashref all ready to go π«Ά
π EXAMPLE π
here's the moment you've been waiting for, the code, the iconic snippet, the main character scene:
use Authen::Credential;
use IO::Socket::SSL;
# get the credential from somewhere
$cred = Authen::Credential->parse(...);
# use the prepare() method to get ready-to-use data
$sslopts = $cred->prepare("IO::Socket::SSL");
$socket = IO::Socket::SSL->new(
PeerHost => "web.acme.com",
PeerPort => "https",
%{ $sslopts },
);
see how the prepare("IO::Socket::SSL") call just dumps those ready-to-use options straight into your socket constructor? obsessed. ππ
π SEE ALSO π
go look at these when you're done here, bestie:
Authen::CredentialIO::Socket::SSL<http://en.wikipedia.org/wiki/X.509>
iykyk π
πΈ AUTHOR πΈ
Lionel Cons <http://cern.ch/lionel.cons> β icon, legend, wrote the thing π
Copyright (C) CERN 2011-2015 π«Ά
and that's a wrap on this page, babe. this one shipped as perl v5.42.0, dated 2025-07-25, and yes the header kept doing that cute little truncation thing with the module name β we fixed the vibe, not the facts. mwah ππβ¨
π¦ where this page comes from
- fedora 43: perl-Authen-Credential 1.2-13.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms