Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Issue with SSL and Guzzle #3

Open
hisnameisjimmy opened this issue Jan 4, 2018 · 2 comments · May be fixed by #4
Open

Issue with SSL and Guzzle #3

hisnameisjimmy opened this issue Jan 4, 2018 · 2 comments · May be fixed by #4
Assignees

Comments

@hisnameisjimmy
Copy link

Running into an issue with Guzzle where it wants the SSL certificate info. Looked into it, it appears you need to specify a verify if you have an SSL: http://guzzle.readthedocs.io/en/stable/request-options.html#verify-option

If we could expose this through the GUI, so that you could append a path instead of modifying the plugin code, I think it would be good to avoid this issue.

@sjelfull sjelfull self-assigned this Jan 4, 2018
@sjelfull
Copy link
Owner

sjelfull commented Jan 4, 2018

Isn't this a problem with the target host not having a valid certificate?

@hisnameisjimmy
Copy link
Author

It's more a problem with Guzzle not being able to find it in normal locations, I believe.

I'm using Forge by Laravel, and their location for the file is:
/etc/nginx/ssl/domain.com/#####/cert.crt

I modified your code to reflect the correct path with a setDefaultOption that points to the correct bundle file:

            // Create client
            $client = new Guzzle();
            $client->setDefaultOption('verify', '/etc/nginx/ssl/domain.com/#####/bundle.crt');
            // Create a new pool and send off requests, 20 at a time
            $transferStrategy = new BatchRequestTransfer($this->settings->parallelRequests);
            $divisorStrategy = $transferStrategy;
            $batch = new Batch($transferStrategy, $divisorStrategy);

This fixed the issue. I'm gonna fork your repo and create a settings input that allows you to specify this in the GUI. I'll then drop you a pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants