diff options
| author | Jakub Zelenka <bukka@php.net> | 2018-05-22 13:41:22 +0100 |
|---|---|---|
| committer | Jakub Zelenka <bukka@php.net> | 2018-05-22 13:41:22 +0100 |
| commit | 3986b6ab6e754a1054a95d9b6df689cfa7000d62 (patch) | |
| tree | 9663a129df09d43b9d5c6e027efb2e7166b9f044 /ext/openssl/php_openssl.h | |
| parent | 6c3a38353c186f4d77624a82e579a98576c484de (diff) | |
| parent | a231860b026baf8a2dfd34852c0cc196e7c7ebfb (diff) | |
| download | php-git-3986b6ab6e754a1054a95d9b6df689cfa7000d62.tar.gz | |
Merge branch 'PHP-7.2'
Diffstat (limited to 'ext/openssl/php_openssl.h')
| -rw-r--r-- | ext/openssl/php_openssl.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h index b69c9d195a..e357550c1a 100644 --- a/ext/openssl/php_openssl.h +++ b/ext/openssl/php_openssl.h @@ -29,6 +29,25 @@ extern zend_module_entry openssl_module_entry; #include "php_version.h" #define PHP_OPENSSL_VERSION PHP_VERSION +#include <openssl/opensslv.h> +#if defined(LIBRESSL_VERSION_NUMBER) +/* LibreSSL version check */ +#if LIBRESSL_VERSION_NUMBER < 0x20700000L +#define PHP_OPENSSL_API_VERSION 0x10001 +#else +#define PHP_OPENSSL_API_VERSION 0x10100 +#endif +#else +/* OpenSSL version check */ +#if OPENSSL_VERSION_NUMBER < 0x10002000L +#define PHP_OPENSSL_API_VERSION 0x10001 +#elif OPENSSL_VERSION_NUMBER < 0x10100000L +#define PHP_OPENSSL_API_VERSION 0x10002 +#else +#define PHP_OPENSSL_API_VERSION 0x10100 +#endif +#endif + #define OPENSSL_RAW_DATA 1 #define OPENSSL_ZERO_PADDING 2 #define OPENSSL_DONT_ZERO_PAD_KEY 4 |
