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

RSA: deal with openssl.cfg better #286

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

terrafrost
Copy link
Member

Fixes #272

$this->configFile = CRYPT_RSA_OPENSSL_CONFIG;
$dir = '@cfg_dir@' . DIRECTORY_SEPARATOR . 'Crypt_RSA';
if (strpos($dir, '@') === false) {
// PEAR installer was used to install the package
Copy link
Member

Choose a reason for hiding this comment

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

Empty if block. ?_?

Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed that in the orig commit but decided to keep it. The alternative would have a comment that says something like "if this condition wasn't met the PEAR installer was used to install the package", which is more wordy and if you're not careful you could miss the "n't" and think it was saying the exact opposite of what it really was.

Copy link
Member

Choose a reason for hiding this comment

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

You could also interpret all sort of other things in a different way. Of course you have to read carefully and correctly, but this is a rather basic assumption. There should be proper comments and there should be no empty blocks. Having empty blocks is just ridicolous.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wouldn't say it was empty lol. There's no code there but there is a comment that satisfies the whole if / then paradigm. And from a performance perspective idk that it's any worse than a !==.

I don't know that I would have thought to have done it that way but unless it's violating a coding standard or it's inconsistent with some other established way of doing things (eg. using fsockopen vs. socket_create; a departure I made from the orig ssh-agent PR) idk that I care that much.

/shrug/ I guess you can change it if you want to idk.

@bantu
Copy link
Member

bantu commented Mar 6, 2014

See #272 (comment)

@bantu bantu mentioned this pull request Mar 10, 2014
@bantu
Copy link
Member

bantu commented Mar 10, 2014

I don't think we should have this patch before the actual issue that is being fixed is explained in more detail. See #272 (comment)

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.

PEAR channel is broken
2 participants