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

SSL Certificate Verification issue when posting to secure hosts #4

Closed
mresults opened this issue Jan 31, 2014 · 3 comments
Closed

SSL Certificate Verification issue when posting to secure hosts #4

mresults opened this issue Jan 31, 2014 · 3 comments

Comments

@mresults
Copy link

Problem manifests itself via a combination of factors:

  • Site is hosted externally:

    • An environment where the system's php.ini file is not modifiable.
    • Host's cURL CAINFO either isn't present or leads to an outdated certificates file
  • Request is made to a 3rd party via SSL (ie. https).

The specific error returned is:

SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Typically we would fix this by updating the server's SSL CA info file, however on an externally hosted server this is not possible.

Wordpress' WP_Http class seems to support specifying a custom CA info file when the request method is called:

'sslcertificates' => ABSPATH . WPINC . '/certificates/ca-bundle.crt',

Not sure if Wordpress' file is out of date?

In any case - is there a way to, preferably via the theme's functions.php file, add a hook to set the CA info file path so that the 3rd Party plugin (and other plugins using the http class) use an updated file for SSL verification?

@zaus
Copy link
Owner

zaus commented Jan 31, 2014

This sounds like http://drzaus.com/plugins/forms-3rdparty#comment-2458 -- I think what you were suggesting is to specify 'sslverify' => false in the wp_remote_post args.

You can do this via the hook at line 415 of the main plugin code, which is described as Forms3rdPartyIntegration_service_filter_args, #5 of the hooks section in the readme. You can write this hook in your functions.php file (or anywhere normally referenced, really), something like:

add_filter('Forms3rdPartyIntegration_service_filter_args', 'forms3rdparty_sslverify_override', 10, 3);
function forms3rdparty_sslverify_override($args, $service, $form) {
    $args['sslverify'] = false;
    return $args;
}

@zaus
Copy link
Owner

zaus commented Feb 12, 2014

@mresults any luck?

@zaus
Copy link
Owner

zaus commented Feb 20, 2014

Closing, no activity

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

No branches or pull requests

2 participants