-
Notifications
You must be signed in to change notification settings - Fork 53
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
Disable verify ssl validation #32
Comments
hi - thanks for your feedback. I might address this shortly by introducing a new option in the Config object - until then your change looks good. Thanks again! |
hi @erkinsergey - I've committed some changes so that you should be able to do this now by setting the config for Services_OpenStreetMap instead of relying on your insertions. ... I'll push a new release once I know this works as expected for you. |
Yes, that's exactly what I need, Thank you!
Some of the data log.txt:
That is, the data is taken from the default configuration. ;( |
After testing, I changed the comment above. |
I've added some unit tests and found that changing the config values in either way, does seem to propagate the new values correctly: $config = ['ssl_verify_peer' => false, 'ssl_verify_host' => false]; $osm = new Services_OpenStreetMap(); I checked these, like you, by adding print_r calls into Services/OpenStreetMap/Transport/HTTP.php after the setConfig calls. Maybe you're not looking at the recent-most portion of your log file? |
Unfortunately, while we do not understand each other. I'll try to explain again. Sorry for my English...
I see that the constructor immediately makes a request /api/capabilities, and already at this point I get an error message:
I see that the Services_OpenStreetMap_Transport_HTTP :: getResponse method contains strings:
Where $config created in the Services_OpenStreetMap_Transport_HTTP constructor as:
That is, as the default constructor with:
My log file:
I can not avoid mistakes, because my settings do not affect the result. |
Hi @erkinsergey, your extra details and trace of what was wrong did help. I adjusted the code so that the library only requests capabilities information after all other configuration settings have been applied, especially settings that would need to be changed to permit access to that API endpoint. While I don't have a test server to connect against to check that my recent changes from tonight will 100% fix this issue, I think it is fixed now. Would you please test that the changes should now work for you? Thanks. |
Yes, now everything works correctly. |
You're very welcome - am happy to get this bug fixed :-) |
How can I prevent ssl from checking without changing the source code of the class Services_OpenStreetMap_Transport_HTTP?
Now I was able to achieve this only by changing the code :
The text was updated successfully, but these errors were encountered: