-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/openssl: Deprecate $key_length parameter of openssl_pkey_derive() #19421
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
@bukka do you know why MacOS is seemingly segfaulting? |
-----END PUBLIC KEY----- | ||
"); | ||
|
||
var_dump(openssl_pkey_derive($pub, $priv, 10)); |
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.
Why do you expect this to be false?
It's not segfaulting but printing the derived secret. I added comment to the test as I'm not sure why there is that false check. This looks like copy of the |
Ah because it's lower for DH... |
Ah MacOS is still on 1.1.1 (which is good because we at least have some test for it) which actually segfaults for me too. |
This is a bug #19428 For testing this deprecation, just use
for now. |
c609660
to
eb5cea1
Compare
-----END PUBLIC KEY----- | ||
"); | ||
|
||
var_dump(bin2hex(openssl_pkey_derive($pub, $priv, 100))); |
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.
var_dump(bin2hex(openssl_pkey_derive($pub, $priv, 100))); | |
var_dump(bin2hex(openssl_pkey_derive($pub, $priv, 1000))); |
And update expectation,,,
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.
Sorry 100 did not make much sense
eb5cea1
to
78a69d7
Compare
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_key_length_parameter_of_openssl_pkey_derive