Web::I...ficate(3pm)
β¨ Web::ID::Certificate β¨
okay bestie so this is Web::ID::Certificate from the User Contributed Perl Documentation, and it's literally just an x509 certificate π like that's it, that's the whole vibe. it's giving "i am a wrapper around a cert and i am thriving". no cap.
π NAME π
Web::ID::Certificate β an x509 certificate π¦
πΈ SYNOPSIS πΈ
my $cert = Web::ID::Certificate->new(pem => $pem_encoded_x509);
foreach (@{ $cert->subject_alt_names })
{
say "SAN: ", $_->type, " = ", $_->value;
}
like. you make a cert, you loop the SANs, you say them out loud. main character energy fr fr π
π DESCRIPTION π
π§ Constructor
newβ the standard Moose-style constructor. that's it, that's the whole thing, iconic behaviour honestly.
π Attributes
pemβ a PEM-encoded string for the certificate. bestie, this is usually the only attribute you actually want to pass to the constructor β just let all the other ones get built automatically, trust. it's giving "let the machine do the work".public_keyβ aWeb::ID::RSAKeyobject. πfingerprintβ a string identifier for the certificate. specifically it's the lower-cased hexadecimal SHA1 hash of the DER-encoded certificate. ngl this one is not used in WebID authentication, but it slays as an identifier for the certificate if you need to keep it in a cache. cache girlies rise π«Άnot_beforeβ aDateTimeobject indicating when the certificate started (or will start) to be valid. β°not_afterβ aDateTimeobject indicating when the certificate will cease (or has ceased) to be valid. π the deadline. the final boss.subject_alt_namesβ an arrayref containing a list of subject alt names (Web::ID::SANobjects) associated with the certificate. these are sorted in the order they'll be tried for WebID authentication β so the order matters, it's not random, periodt.san_factoryβ a coderef used for buildingWeb::ID::SANobjects. honestly? it's very unlikely you need to play with this β the default is probably OK. but changing it is "supported" (in so much as any of this is supported π like, that's the official level of supported, okay).
the coderef is passed a hash (not hashref, bestie, a hash) along the lines of:
(
type => 'uniformResourceIdentifier',
value => 'http://example.com/id/alice',
)
π Methods
timelyβ checksnot_beforeandnot_afteragainst the current system time to indicate whether the certificate is temporally valid. returns a boolean. you can optionally pass it aDateTimeobject to use instead of the current system time. vibe check, but for time β¨exponentβ delegated to thepublic_keyattribute. it's not doing the work, it's just passing the aux cord π§modulusβ delegated to thepublic_keyattribute. same energy, same delegation, we love a consistent queen π
π¦ BUGS π¦
please report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=Web-ID>. not me asking you to snitch, but like, do snitch, it helps π
π SEE ALSO π
Web::ID, Web::ID::SAN, Web::ID::RSAKey.
Web::ID::Certificate::Generator β augments this class to add the ability to generate new WebID certificates. it's the glow-up version of this module basically π
Crypt::X509 provides a pure Perl X.509 certificate parser, and is used internally by this module. pure Perl representation, we respect it π
β AUTHOR β
Toby Inkster <tobyink@cpan.org>. legend behaviour.
π COPYRIGHT AND LICENCE π
this software is copyright (c) 2012 by Toby Inkster.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in freedom, bestie, go wild π¦
πΈ DISCLAIMER OF WARRANTIES πΈ
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
like. no promises. zero. none. it is what it is and what it is is "as is" π
and that's the whole page pookie!! this was the perl v5.32.1 build of the User Contributed Perl Documentation, dated 2021-09-11 β go forth and validate some certificates, mwah πβ¨
π¦ where this page comes from
- debian bookworm: libweb-id-perl 1.927-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libweb-id-perl 1.927-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libweb-id-perl 1.927-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libweb-id-perl 1.927-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms