-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Bug #38917 - Native SPKAC support request #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… patch for bug id #61421
… patch for bug id #61421
…dividual files as requested
… clean up any memory leaks
…t #38917 for native SPKAC support. Four new functions along with test cases: openssl_spki_new(), openssl_spki_verify(), openssl_spki_export(), openssl_spki_export_challenge()
@@ -242,6 +245,16 @@ enum php_openssl_cipher_type { | |||
ZEND_ARG_INFO(0, key) | |||
ZEND_END_ARG_INFO() | |||
|
|||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L | |||
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pbkdf2, 0, 0, 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be part of the patch too? Discussion does not mention it...
It would be nice to also add some tests for failure scenarios. |
PHP_FUNCTION(openssl_spki_export) | ||
{ | ||
int spkstr_len; | ||
char *spkstr, * spkstr_cleaned, * s; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These variables are not initialized. This leads to segfault of wrong string.
This code segfaults: php -r 'var_dump(openssl_spki_export("2438"));' |
@smalyshev I have fixed the requested memory leak, changed the internal function away from the proto keyword and created error test cases as requested. Thanks for your help! |
…s to accomidate failures
…NING in openssl_spki_new()
@smalyshev sorry if your busy with other things, when you get a minute I was just wondering about the status of this patch. |
@jas- Well, right now for 5.5 we need approval of the RM (Julien Pauli) or we'll have to wait for 5.5.1. |
Great, thanks! |
* PHP-5.4: (22175 commits) fix valgrind warning Fix bug #64023 (__toString() & SplFileInfo) Fix test related to change for #bug64007 and also fix in newInstanceArgs NEWS: Start PHP 5.5.0 Beta 1 section NEWS for PHP 5.5.0alpha4 Fix NEWS fix tests Merge fix of #62836 to ?.re, and regenerate ?.c Fixed bug #64007 (There is an ability to create instance of Generator by hand). - Fixed ZTS build Class Name Resolution As Scalar Via "class" Keyword fix bug #63462 (Magic methods called twice for unset protected properties) NEWS for bug #64011. See 77ee200 Fix bug #64011 (get_html_translation_table()) Update config.sub to latest GPLv2 upstream version Fixed bug #63988 (Two Date tests fail) only for PHP-5.5 Fix skipif section Added ARM accelerated implementations for ZEND_SIGNED_MULTIPLY_LONG() Added test cases for ZEND_SIGNED_MULTIPLY_LONG() Fix News ...
* PHP-5.5: Sat Apr 7 21:02:37 MDT 2012 - Fixed segfaults and should just need to clean up any memory leaks Tue Apr 3 22:27:41 MDT 2012 - Split SPKI family of test cases into individual files as requested Tue Apr 3 21:21:20 MDT 2012 - Additional checks for supported algorithm types Tue Apr 3 14:41:40 MDT 2012 - SPKI functions, recommended changes and patch for bug id #61421 Tue Apr 3 14:40:49 MDT 2012 - SPKI functions, recommended changes and patch for bug id #61421 Conflicts: ext/openssl/openssl.c ext/openssl/tests/openssl_spki_export.phpt ext/openssl/tests/openssl_spki_export_challenge.phpt ext/openssl/tests/openssl_spki_new.phpt ext/openssl/tests/openssl_spki_verify.phpt
Can you do a PR with the latest code? Or request an account to maintain it in ext/openssl? add me as sponsor. Thanks for your work! |
No problem, its only a small contribution @pierrejoye. I ran into some snags getting the upstream PHP 5.5 changes merged into my local branch but they have been resolved and all changes should now be in this pull request. Asking for an account involves posting a message to internals I am assuming? |
@jas- a mail to internals would be a good start, but you also have to use this form: http://www.php.net/git-php.php |
Strange, that happened quite a while ago and was pushed to master @ git.php.net. I believe there is a freeze on new features which is why it isn't closed yet Jason Gerfen On Jul 17, 2013, at 4:40 PM, Lior Kaplan notifications@github.com wrote:
|
@jas- You're right, committed in http://git.php.net/?p=php-src.git;a=commit;h=8f56ac8401ed1c3e00b8fba3fb8e5efb565180c4 and the bug should also be closed. |
Comment on behalf of stas at php.net: merged |
Wed Jan 30 09:06:49 MST 2013 - Pull request addressing feature request #38917 for native SPKAC support. Four new functions along with test cases:
(string) openssl_spki_new((object) private_key, (string) challenge, (int) algorithm)
(bool) openssl_spki_verify((string) spkac)
(string) openssl_spki_export((string) spkac)
(string) openssl_spki_export_challenge((string) spkac)