laziness, impatience, and hubris | |
PerlMonks |
Re: New to perl - Check authenticity of cpan mods installed/usedby ferreira (Chaplain) |
on Feb 21, 2019 at 18:12 UTC ( [id://1230318]=note: print w/replies, xml ) | Need Help?? |
With respect to "Check authenticity of cpan mods installed", I know that every tarball accepted on CPAN has a few checksum attributes computed and stored in the corresponding CPAN author directory. For example, let's say you are interested in this specific distribution release: https://cpan.metacpan.org/authors/id/A/AN/ANDK/CPAN-Checksums-2.12.tar.gzYou can find the "checksum" for every file on ANDK directory at https://www.cpan.org/authors/id/A/AN/ANDK/CHECKSUMSThis file has a data structure encoded in Perl itself, and the bit that matters for the tarball in question is
So you can write code to make sure the downloaded tarball matches the corresponding attributes / checksums. For example, the commands below (on OS X) manually "check" the size and md5 sum of the .gz file.
I think some CPAN clients (especiallly CPAN which is part of Perl core) may be configured to verify those checksums while downloading and installing. Someone else may correct me or point to the specific incantations to make that work.
In Section
Seekers of Perl Wisdom
|
|