Skip to content

Conversation

@devnexen
Copy link
Member

@devnexen devnexen commented Oct 5, 2018

Proposal to abstract a subset of the openssl module,
to be able to use two ways encryption outside of this context.

@nikic
Copy link
Member

nikic commented Oct 5, 2018

Windows builds failing with "'php_openssl_cipher_iv_length': definition of dllimport function not allowed", so I guess PHPAPI is not quite right. @weltling How are API functions correctly defined in extensions?

@devnexen devnexen force-pushed the openssl_refactoring branch from d00d05f to f920648 Compare October 5, 2018 17:38
@KalleZ
Copy link
Member

KalleZ commented Oct 5, 2018

@nikic extensions that exports should define their own export decl (not that it should matter to use PHPAPI tho), many do that by defining their own PHP_XXX_API macro in ext/xxx/php_xxx.h and then export them like that, it should be all that we need afair

@php-pulls
Copy link

Comment on behalf of petk at php.net:

Labelling

@devnexen devnexen force-pushed the openssl_refactoring branch from 231352d to a92947b Compare October 12, 2018 12:24
@devnexen devnexen force-pushed the openssl_refactoring branch from 506f6a4 to 432d3c7 Compare October 21, 2018 19:45
@devnexen devnexen force-pushed the openssl_refactoring branch from 432d3c7 to 1e3e20a Compare December 10, 2018 09:17
@devnexen
Copy link
Member Author

devnexen commented Dec 27, 2018

Any chance it gets merged @bukka @KalleZ @nikic ? :-)

@bukka
Copy link
Member

bukka commented Dec 30, 2018

@devnexen Seems ok from the quick (just one NIT). Could you pls also squash it.

@devnexen
Copy link
Member Author

@bukka sorry to bother :-) but it s just to avoid further rebasing. Thanks.

@devnexen devnexen force-pushed the openssl_refactoring branch 2 times, most recently from 260b4bb to 4148257 Compare January 11, 2019 16:37
@bukka
Copy link
Member

bukka commented Jan 12, 2019

@devnexen Sorry for taking so long to do a better review but added few comments to the API. Will merge it as soon as it's addressed.

@devnexen devnexen force-pushed the openssl_refactoring branch from fc2f4ac to 64c6f62 Compare January 13, 2019 08:22
@devnexen devnexen force-pushed the openssl_refactoring branch 2 times, most recently from 274bba1 to 2c3dd0c Compare January 13, 2019 21:11
RETVAL_FALSE;
if (outbuf)
zend_string_release_ex(outbuf, 0);
outbuf = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be outbuf = NULL? Same in a few cases below.

I'm also wondering why this code needed a change. Not that it's necessarily wrong, but I would expect that if outbuf needs to be freed here, then that have also been the case before this refactoring. Or am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By itself the change is not feature changing for sure but it gives the possiblity to uses the api outside of this module (I have further plans personally).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't mean the overall change, but the added zend_string_release call here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I launched the unit tests I got leak warnings. Not against changing to NULL for the rest.

Proposal to abstract a subset of the openssl module,
to be able to use two ways encryption outside of this context.
@devnexen devnexen force-pushed the openssl_refactoring branch from 2c3dd0c to 857d8a1 Compare January 14, 2019 11:49
@bukka
Copy link
Member

bukka commented Jan 14, 2019

Merged as 62c7432 ! Thanks!

I can't close it as https://qa.php.net/pulls/# still seems to be not working for me (no PR's listed). Think it would be good idea to add committers to the project so everyone can handle PR in here which would be much simpler even when qa.php.net works. Also it would good that we could use assigning and official approvals. In the meantime please someone close this.

@nikic nikic closed this Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants