Skip to content

getNextAddress ssl error #13

@xianggy

Description

@xianggy

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions