Req #71143 [NEW]: Define LIBRESSL_VERSION_NUMBER when available

From: Date: Wed, 16 Dec 2015 21:22:50 +0000
Subject: Req #71143 [NEW]: Define LIBRESSL_VERSION_NUMBER when available
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197939@lists.php.net to get a copy of this message
From: fsb at thefsb dot org Operating system: any PHP version: Irrelevant Package: OpenSSL related Bug Type: Feature/Change Request Bug description:Define LIBRESSL_VERSION_NUMBER when available Description: ------------ Testing for LibreSSL and its version number via OPENSSL_VERSION_TEXT is possible but not ideal. Since 2.2.2 LibreSSL defines LIBRESSL_VERSION_NUMBER. I would prefer to use this. Please define LIBRESSL_VERSION_NUMBER as a constant in PHP user space, or provide another way to access it. Test script: --------------- if (defined('OPENSSL_VERSION_TEXT')) { echo 'OPENSSL_VERSION_TEXT is ' . OPENSSL_VERSION_TEXT . "\n"; if (strpos(OPENSSL_VERSION_TEXT, 'LibreSSL') === 0) { echo 'LIBRESSL_VERSION_NUMBER is ' . (defined('LIBRESSL_VERSION_NUMBER') ? dechex(LIBRESSL_VERSION_NUMBER) : 'undefined') . "\n"; } } else { echo "OpenSSL not presentn\n"; } Expected result: ---------------- For example... OPENSSL_VERSION_TEXT is LibreSSL 2.3.1 LIBRESSL_VERSION_NUMBER is 20301000 Actual result: -------------- For example... OPENSSL_VERSION_TEXT is LibreSSL 2.3.1 LIBRESSL_VERSION_NUMBER is undefined -- Edit bug report at https://bugs.php.net/bug.php?id=71143&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71143&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71143&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71143&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71143&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71143&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71143&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71143&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71143&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71143&r=support Expected behavior: https://bugs.php.net/fix.php?id=71143&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71143&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71143&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71143&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71143&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71143&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71143&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71143&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71143&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71143&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71143&r=mysqlcfg

« previous php.bugs (#197939) next »