OpenSSL::Versions

Parse OpenSSL version number
Download

OpenSSL::Versions Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • A. Sinan Unur
  • Publisher web site:
  • http://search.cpan.org/~nanis/

OpenSSL::Versions Tags


OpenSSL::Versions Description

OpenSSL::Versions is a Perl module that can parse OpenSSL version number.MOTIVATIONOpenSSL source code uses a hexadecimal number which encodes various bits of information. The meaning of various parts have changed over the history of the library. For example, you have #define OPENSSL_VERSION_NUMBER 0x0913 /* Version 0.9.1c is 0913 */versus #define OPENSSL_VERSION_NUMBER 0x1000007fL /* OpenSSL 1.0.0g */The evolution of the version number scheme is explained in the crypto/opensslv.h file in the distribution. If you have already built OpenSSL, you can determine its version by invoking the command line utility: $ openssl version OpenSSL 1.0.0g 18 Jan 2012However, if all you have is the source code, and you want to determine exact version information on the basis of the string representation of the OPENSSL_VERSION_NUMBER macro, you have to use pattern matching and deal with a bunch of corner cases.The Makefile.PL for Crypt::SSLeay contained a simplistic approach to parsing the value of OPENSSL_VERSION_NUMBER which people had tweaked over time to deal with changes. I added functions to deal with specific ranges of version numbers. But, I did not think those functions belonged in a Makefile.PL.So, I put them in their own module. To test the routines, I downloaded all available versions of OpenSSL from http://www.openssl.org/source/ (excluding archives with 'fips' and 'engine' in their names, and built a mapping between the value of OPENSSL_VERSION_NUMBER in each archive and the corresponding human friendly version string in the name of the archive.SYNOPSISParse OpenSSL version number from source code. use OpenSSL::Versions qw( parse_openssl_version_number ); my $v = parse_openssl_version_number('0x0913'); print "$v\n";Outputs: 0.9.1cProduct's homepage


OpenSSL::Versions Related Software