Skip to content

PHPC-698, PHPC-699: Check HAVE_OPENSSL_EXT before calling php-ssl.c functions #324

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

Merged
merged 2 commits into from
May 10, 2016

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented May 10, 2016

jmikola added 2 commits May 10, 2016 15:16
…iver

php_phongo_verify_hostname() can also be static, since it is not used outside of php_phongo.c
@derickr
Copy link
Contributor

derickr commented May 10, 2016

LGTM

@jmikola jmikola merged commit c6d43a5 into mongodb:v1.1 May 10, 2016
jmikola added a commit that referenced this pull request May 10, 2016
@jmikola jmikola deleted the phpc-698 branch May 10, 2016 20:27
@bjori
Copy link
Contributor

bjori commented May 10, 2016

Wouldn't you rather want to error out much earlier, say before calling php_phongo_ssl_verify (), if there are ssl context options set, while ssl is not enabled/available?

@jmikola
Copy link
Member Author

jmikola commented May 10, 2016

@bjori: This PR is specific to the user compiling the extension without SSL but loading in a PHP runtime with SSL. I'm fine with keeping the error messages narrow around the code that would actually rely on these symbols. The user needn't be bothered if the stream options are disabled.

The inverse case is if SSL isn't available at runtime. For that, the user would already get an exception during stream initialization and before we attempt to verify any certs or hostnames.

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