Web::I...ficate(3pm)

πŸ“¦
version 1.927 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ 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 β€” a Web::ID::RSAKey object. πŸ”‘
  • 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 β€” a DateTime object indicating when the certificate started (or will start) to be valid. ⏰
  • not_after β€” a DateTime object 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::SAN objects) 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 building Web::ID::SAN objects. 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 β€” checks not_before and not_after against the current system time to indicate whether the certificate is temporally valid. returns a boolean. you can optionally pass it a DateTime object to use instead of the current system time. vibe check, but for time ✨
  • exponent β€” delegated to the public_key attribute. it's not doing the work, it's just passing the aux cord 🎧
  • modulus β€” delegated to the public_key attribute. 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.


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