Skip to content
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

Replace mcrypt with openssl #34

Merged
merged 1 commit into from
Apr 4, 2018
Merged

Conversation

r-a-y
Copy link
Contributor

@r-a-y r-a-y commented Mar 15, 2018

See #19.

mcrypt is deprecated in PHP 7.1.

In the PR, due to the usage of hash_equals(), this bumps the PHP requirement to 5.6.

If you'd rather omit hash_equals(), the PHP requirement drops to PHP 5.3.3. PHP also needs to have the openssl module enabled. I haven't done any checks for these things in this PR.

For the cipher, I picked AES-128-ECB as it is similar to what you were using in mcrypt, but feel free to change.

mcrypt is deprecated as of PHP 7.1.

See voceconnect#19.
@tdlm
Copy link
Contributor

tdlm commented Mar 30, 2018

Gave this a review and test, and as far as I can tell, it works without errors and looks good to me.

@kevinlangleyjr kevinlangleyjr merged commit aeaaa39 into voceconnect:master Apr 4, 2018
@kevinlangleyjr
Copy link
Member

Thanks for this @r-a-y!

@r-a-y
Copy link
Contributor Author

r-a-y commented Apr 4, 2018

Thanks for merging!

As for what I mentioned above:

In the PR, due to the usage of hash_equals(), this bumps the PHP requirement to 5.6.

If you'd rather omit hash_equals(), the PHP requirement drops to PHP 5.3.3. PHP also needs to have the openssl module enabled. I haven't done any checks for these things in this PR.

We should make sure that the plugin gracefully bails out of plugin execution if the current install does not support PHP 5.6 or if openssl is not compiled with PHP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants