freddiecoleman / chia-client

TypeScript client for Chia RPC interfaces.
https://www.chiaexplorer.com/
MIT License
89 stars 43 forks source link

getNextAddress ssl error #13

Open xianggy opened 3 years ago

xianggy commented 3 years ago

The JS code: const wallet = new Wallet({ protocol: 'https', hostname: '47.241.90.20', port: 9256, caCertPath: './xch_ssh/private_ca.crt', certPath: './xch_ssh/private_daemon.crt', keyPath: './xch_ssh/private_daemon.key', }); wallet.getNextAddress('1').then(console.log);

got errors: (node:55573) UnhandledPromiseRejectionWarning: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: IP: 47.241.90.20 is not in the cert's list: at Object.checkServerIdentity (tls.js:297:12) at TLSSocket.onConnectSecure (_tls_wrap.js:1507:27) at TLSSocket.emit (events.js:315:20) at TLSSocket._finishInit (_tls_wrap.js:932:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12) at TLSWrap.callbackTrampoline (internal/async_hooks.js:131:14)

So which ssl files should the params caCertPath, certPath, keyPath point to ?

JordyBaylac commented 3 years ago

Can you try omitting all arguments? Just use new Wallet()

xianggy commented 3 years ago

It difficult, because the wallet node is running on another Ubuntu device. So any other solutions please or Can I set the server not to verify the client?