Coinbase API client.getAccount(…) started returning: “Error: unable to get local issuer certificate” [duplicate]

大憨熊 提交于 2020-05-31 03:41:32

问题


The issue started late-morning PT, on March 31, 2020. The server making the API call to Coinbase is hosted on Google App Engine with node.js (GCP). The same cert-connectivity problem to Coinbase also happened a few weeks ago, and lasted for about a day. The cert-connectivity problem went away all by itself at that time. No code changes were made to the server calling the Coinbase API then, or today. The same code has been working for over a year, but was moved to App engine a few months ago. - Has Coinbase been making network changes that would impact cert-authentication to Google Cloud Platform?


回答1:


Coinbase they updated their certificates . Fix: when you initiate the client you can either set strictSSL to false or pass in the new valid certificates.

Set strictSSL to false:

var Client = require('coinbase').Client;
var client = new Client({
   apiKey: mykey, 
   apiSecret: mysecret,
   strictSSL: false
});

update cert files (you should be able to export them here - https://baltimore-cybertrust-root.chain-demos.digicert.com/ or try coinbase.com and export there):

var Client = require('coinbase').Client;
var client = new Client({
   apiKey: mykey, 
   apiSecret: mysecret,
   caFile: myNewCertFile
});

myNewCertFiles should follow this files format with the updated certs: https://github.com/coinbase/coinbase-node/blob/master/lib/CoinbaseCertStore.js



来源:https://stackoverflow.com/questions/60961069/coinbase-api-client-getaccount-started-returning-error-unable-to-get-loc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!