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

cURL error 77: error setting certificate verify locations #120

Closed
rodvina opened this issue Jan 23, 2019 · 7 comments
Closed

cURL error 77: error setting certificate verify locations #120

rodvina opened this issue Jan 23, 2019 · 7 comments

Comments

@rodvina
Copy link

rodvina commented Jan 23, 2019

Q A
Bug? yes
New Feature? no
Module Version 1.0.0-beta1
PHP Client version 2.0.0
Requires PHP client fix no

Actual Behavior

The following error occurs when testing the connection to our Apigee Edge from my local windows 10 env.

Failed to connect to Apigee Edge. Check the debug information below for more details. Error message: cURL error 77: error setting certificate verify locations: CAfile: C:/certs/apigeemgtui.dev.testinternal.site.pem CApath: /etc/ssl/certs (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Expected Behavior

Expecting Connection Successful message.

Steps to Reproduce the behavior

Added this entry to my php.ini file:
curl.cainfo = "c:/certs/apigeemgtui.dev.testinternal.site.pem"
Navigated to Configuration | Apigee Edge | General to specify connection settings.
Clicked on Test Connection | Send Request.
The error occurs.

Proposed Solution

If you have already ideas how to solve the issue please describe it here.
(Remove this section if it is not needed.)

@mxr576
Copy link
Contributor

mxr576 commented Jan 24, 2019

Hi @rodvina!

This seems to me a server configuration issue as you have also realized. My skills with configuring LA/EMP servers on Windows have been faded a little bit in the couple of yours but I'll try to help.

  1. Make sure you have modified the correct php.ini file. Check php.ini files used by using the php --ini command or visit /admin/reports/status/php in a Drupal site as an admin.
  2. Do not forget to restart the server after you have modified the php.ini file.
  3. Check this thread, it seems to me that there as some good suggestions in it: https://stackoverflow.com/questions/30240840/laravel-5-socialite-curl-error-77-error-setting-certificate-verify-locations. For example, if you are using XAMPP then try to move the CA certificate to the xampp/php folder.

If you still can not solve this issue you could try to setup a site by using Lando, here is a detailed guide about how you can do that: https://docs.apigee.com/api-platform/publish/drupal/open-source-drupal-8

@rodvina
Copy link
Author

rodvina commented Jan 24, 2019

Hi @mxr576,

Thanks for the reply. I am actually using lando. So I am actually using my own php.ini file as defined in the .lando.yml file. The error message changes with whatever value I specify for curl.cainfo. I've tried various other path locations with no luck. I've also tried it on my MAC OSX and get the same error. Is there, perhaps some other php.ini setting that I may be missing?

@cnovak
Copy link
Collaborator

cnovak commented Jan 24, 2019

If you are using Lando, the path you set in the curl.cainfo setting seems wrong and should not be needed since the cURL settings should work correctly without you changing that setting. If you are running in Lando I don't think the c:/certs file location would be mounted in the container. If you ssh into that docker container can you see that pem file?

It could be this reported Lando issue #1247 if you are not modifying the curl.cainfo setting. You can verify you are running RC1 by using lando version command.

@rodvina
Copy link
Author

rodvina commented Jan 24, 2019

It is a self-signed cert that I need to supply. It sounds like I need to place the pem file in a location within the docker container and supply that path for curl.cainfo? If so, how is this accomplished?

@cnovak
Copy link
Collaborator

cnovak commented Jan 24, 2019

It looks like the default CApath is set to /etc/ssl/certs on that lando appserver. Try lando ssh appserver and make sure your cert is put into that directory. Not sure if that is exactly the process however.

@rodvina
Copy link
Author

rodvina commented Jan 28, 2019

That worked, thanks @cnovak ! Now, I'm getting

Apigee\Edge\Exception\CpsNotEnabledException: in Apigee\Edge\Api\Management\Controller\AppByOwnerController->createPager() (line 45 of /app/vendor/apigee/apigee-client-php/src/Controller/PaginationHelperTrait.php)

when clicking My Apps after I created a user.

Does CPS have to be enabled in order to use this drupal 8 module?

@cnovak
Copy link
Collaborator

cnovak commented Jan 29, 2019

Great, I am closing this issue, opened #123 for the CPS issue.

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 a pull request may close this issue.

3 participants