OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)

后端 未结 5 882
遇见更好的自我
遇见更好的自我 2021-02-12 23:49

There are a ton of posts about this. I have looked at so many of them. Zero of the fixes seem to work.

(main)> PayPal:         


        
5条回答
  •  执笔经年
    2021-02-13 00:07

    Its possible to fix this by using the server's own CA file.

    Try setting ssl_options: { ca_file: nil }.

    This causes the paypal.crt CA file bundled with the paypal-sdk gem to be ignored.

    For apps using PayPal::SDK.configure(...)

    PayPal::SDK.configure(
      mode: ...,
      client_id: ...,
      client_secret: ...,
    
      # Deliberately set ca_file to nil so the system's Cert Authority is used,
      # instead of the bundled paypal.crt file which is out-of-date due to:
      # https://www.paypal.com/va/smarthelp/article/discontinue-use-of-verisign-g5-root-certificates-ts2240
      ssl_options: { ca_file: nil }
    )
    

    For apps using a YAML config file

    In config/paypal.yml or wherever your config file is located:

    ssl_options:
      ca_file: null
    

提交回复
热议问题