Skip to content

openssl_pkey_export() allows null for the passphrase#256

Merged
ondrejmirtes merged 1 commit intophpstan:masterfrom
ConradSollitt:patch-1
Jun 24, 2020
Merged

openssl_pkey_export() allows null for the passphrase#256
ondrejmirtes merged 1 commit intophpstan:masterfrom
ConradSollitt:patch-1

Conversation

@ConradSollitt
Copy link
Copy Markdown
Contributor

This issue was originally discussed here: fastsitephp/fastsitephp#20 (comment)

Basically, PHP Docs shows that openssl_pkey_export() and openssl_pkey_export_to_file() use string type for the passphrase parameter while a review of PHP Source Code https://github.com/php/php-src/ shows that both strings and null are used and supported.

This was found when originally changing null to an empty string '' for PHPStan causes multiple unit tests to break in a project which uses PHPStan.

@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you :)

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.

2 participants