Commit: 733aaf23b1ba58e1a6abb9c0d00aedf67d143167 Author: Felipe Pena <felipe...@gmail.com> Mon, 11 Jun 2012 14:08:38 -0300 Parents: 0c6351778a2974342f630a25a3bab4d8fee7e0c6 Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=733aaf23b1ba58e1a6abb9c0d00aedf67d143167 Log: - Fixed build (PKCS5_PBKDF2_HMAC is from 1.0.0) Changed paths: M ext/openssl/openssl.c M ext/openssl/tests/openssl_pkcs5_pbkdf2_hmac.phpt Diff: diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 12ecfa4..1f515c7 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -238,6 +238,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkey_get_details, 0) ZEND_ARG_INFO(0, key) ZEND_END_ARG_INFO() +#if OPENSSL_VERSION_NUMBER >= 0x10000000L ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs5_pbkdf2_hmac, 0, 0, 4) ZEND_ARG_INFO(0, password) ZEND_ARG_INFO(0, salt) @@ -245,6 +246,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs5_pbkdf2_hmac, 0, 0, 4) ZEND_ARG_INFO(0, iterations) ZEND_ARG_INFO(0, digest_algorithm) ZEND_END_ARG_INFO() +#endif ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs7_verify, 0, 0, 2) ZEND_ARG_INFO(0, filename) @@ -432,7 +434,9 @@ const zend_function_entry openssl_functions[] = { PHP_FE(openssl_seal, arginfo_openssl_seal) PHP_FE(openssl_open, arginfo_openssl_open) - PHP_FE(openssl_pkcs5_pbkdf2_hmac, arginfo_openssl_pkcs5_pbkdf2_hmac) +#if OPENSSL_VERSION_NUMBER >= 0x10000000L + PHP_FE(openssl_pkcs5_pbkdf2_hmac, arginfo_openssl_pkcs5_pbkdf2_hmac) +#endif /* for S/MIME handling */ PHP_FE(openssl_pkcs7_verify, arginfo_openssl_pkcs7_verify) @@ -3323,6 +3327,8 @@ PHP_FUNCTION(openssl_pkey_get_details) /* }}} */ +#if OPENSSL_VERSION_NUMBER >= 0x10000000L + /* {{{ proto string openssl_pkcs5_pbkdf2_hmac(string password, string salt, long key_length, long iterations [, string digest_method = "sha1"]) Generates a PKCS5 v2 PBKDF2 string, defaults to sha1 */ PHP_FUNCTION(openssl_pkcs5_pbkdf2_hmac) @@ -3370,6 +3376,8 @@ PHP_FUNCTION(openssl_pkcs5_pbkdf2_hmac) } /* }}} */ +#endif + /* {{{ PKCS7 S/MIME functions */ /* {{{ proto bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]]) diff --git a/ext/openssl/tests/openssl_pkcs5_pbkdf2_hmac.phpt b/ext/openssl/tests/openssl_pkcs5_pbkdf2_hmac.phpt index 348d399..af1fcb1 100644 --- a/ext/openssl/tests/openssl_pkcs5_pbkdf2_hmac.phpt +++ b/ext/openssl/tests/openssl_pkcs5_pbkdf2_hmac.phpt @@ -1,7 +1,7 @@ --TEST-- openssl_pkcs5_pbkdf2_hmac() tests --SKIPIF-- -<?php if (!extension_loaded("openssl")) print "skip"; ?> +<?php if (!extension_loaded("openssl") || !function_exists("openssl_pkcs5_pbkdf2_hmac")) print "skip"; ?> --FILE-- <?php // official test vectors -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php