VerifyX509(3)
π VerifyX509(3) β the Crypt::OpenSSL::VerifyX509 glow-up
okay so bestie, this is a page out of the User Contributed Perl Documentation section of the manual β VerifyX509(3) β and it's lowkey a whole bop. let's get into it π
β¨ NAME β¨
Crypt::OpenSSL::VerifyX509 β simple certificate verification. that's it. that's the vibe. no cap, it does exactly one thing and it slays at it π
π¦ SYNOPSIS π¦
like, here's the whole main character moment in code form:
use Crypt::OpenSSL::VerifyX509;
use Crypt::OpenSSL::X509;
my $ca = Crypt::OpenSSL::VerifyX509->new('t/cacert.pem');
my $cert = Crypt::OpenSSL::X509->new(...);
$ca->verify($cert);
literally that's it. load the modules, build your verifier off 't/cacert.pem', make your $cert, and call verify. iconic behavior honestly πΈ
π DESCRIPTION π
so picture this: you've got a CA certificate, and you've got another certificate that you don't trust yet (rude of it, but okay). hand both to this module and it will tell you whether the CA actually signs that certificate. it's giving vibe check for cryptography β¨
why would you even need this? because this is a genuinely useful thing to have when you're signing with X509 certificates but you're doing it outside of SSL. yes, that's a whole thing, and yes, people do it π«Ά
a specific example (and the one the author clearly had in mind): you're working with XML signatures, and you need to verify that the signing certificate is valid. that's the moment. that's the whole reason this module exists π₯
now, you could use Crypt::OpenSSL::CA to do this β it's right there β but it's based on Inline::C, which can be troublesome in some situations. like, it'll work and then it'll be weird about it π. so this module provides an XS alternative for the certificate verify feature. same energy, fewer situations, periodt π
π METHODS π
π new($ca_path)
the constructor, bestie. it returns a VerifyX509 instance, all set up and ready to go with the CA you gave it. π§
Arguments:
$ca_pathβ path to a file containing the CA certificate
β verify($cert)
the whole point of the module, fr fr. it verifies that the certificate is signed by the CA. returns true if so π and croaks with the verification error if not. no quiet little "false", no subtle vibe β it croaks, loudly, with the actual error π€
Arguments:
$certβ aCrypt::OpenSSL::X509object for the certificate to verify.
πΈ AUTHOR πΈ
Chris Andrews <chrisandrews@venda.com>
π MAINTAINER π
Timothy Legge <timlegge@gmail.com>
πΊ COPYRIGHT πΊ
the following copyright notice applies to all the files provided in this distribution, including binary files, unless explicitly noted otherwise. so like, don't try to wiggle out of it π
Copyright 2010 Venda Ltd.
π LICENCE π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. free as in, go forth and slay ποΈ
friendly reminder: verify doesn't return false on failure β it croaks. wrap it if you're not ready for that kind of energy π
okay that's the whole page, bestie β mwah π this gem was documented in perl v5.42.2 and last touched on 2025-06-30, so if you're reading this from the future, hi, hope the certs still verify π¦β¨
π¦ where this page comes from
- alpine 3.24: perl-crypt-openssl-verifyx509-doc 0.21-r5 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms