curl 60: SSL certificate problem: unable to get local issuer certificate [url] https://identity.api.rackspacecloud.com/v2.0/tokens

0

Recent Rackspace has updated its SSL certificates for some services services, one of which is OpenCloud that stores files. Some developers that have been using the php-opencloud module have been experiencing errors like this:

  

[curl] 60: SSL certificate problem: unable to get local issuer certificate [url] link

Or this one:

  

ssl.SSLError: [Errno 1] _ssl.c: 510: error: 14090086: SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed

What can be done to mitigate this error?

    
asked by manix 19.06.2018 в 22:17
source

1 answer

1

The rackspace api makes use of the Guzzle library that verifies the SSL of your site, as there is no certificate or an outdated one, it throws the described error. There are several alternatives to solve it, each solution serves one or the other.

Option 1: php.ini - curl.cainfo

  • Download the file cacert.pem
  • Put it in some location such as C: \ Apache \ php \
  • Edit the file php.ini , add the following line:

    curl.cainfo="C:\Apache24\php\ca-bundle.crt"
    
  • Restart apache and you're done

  • Option 2: Replace Guzzle certificate

    When guzzle is installed by composer, the certificate is also installed in the following location:

      

    vendor \ guzzle \ guzzle \ src \ Guzzle \ Http \ Resources \ cacert.pem

    Download the certificate cacert.pem and replace it with the guzzle

    Option 3: Disable SSL verification (not recommended)

    Although it is an option, it is not recommended for security vulnerabilities:

    $client->setDefaultOption('verify', false);
    
        
    answered by 19.06.2018 в 22:17