YOYOW Windows 下 或 Docker 环境下 cli 无法连接 wss 节点的问题

vianull · 2019年05月30日 · 最后由 vianull 回复于 2019年05月30日 · 136 次阅读

C:\Users\wnz\Downloads>.\yoyow_client.exe -swss://wallet.yoyow.org
Logging RPC to file: logs\rpc\rpc.log
3405763ms th_a main.cpp:119 main ] key_to_wif( committee_private_key ): 5KCBDTcyDqzsqehcb52tW5nU6pXife6V2rX9Yf7c3saYSzbDZ5W
3405826ms th_a main.cpp:123 main ] nathan_pub_key: YYW6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
3405982ms th_a main.cpp:124 main ] key_to_wif( nathan_private_key ): 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 Starting a new wallet with chain ID ae4f234c75199f67e526c9478cf499dd6e94c2b66830ee5c58d0868a3179baf6 (from egenesis)
3406091ms th_a main.cpp:171 main ] wdata.ws_server: wss://wallet.yoyow.org
0 exception: unspecified
TLS handshake failed
{"message":"TLS handshake failed"}
asio websocket.cpp:518 fc::http::detail::websocket_tls_client_impl::{ctor}::::operator ()

{"uri":"wss://wallet.yoyow.org"}
th_a websocket.cpp:704 fc::http::websocket_client::secure_connect

{"uri":"wss://wallet.yoyow.org"}
th_a websocket.cpp:678 fc::http::websocket_client::connect

共收到 2 条回复

The reason is cli_wallet tried to verify the server's certificate with OpenSSL but failed, because I didn't include a default list of trusted root certificates into the binary.

Workaround:

create your own PEM bundle which contains required root / intermediate certificates, or get one from somewhere (at your own risk), for example, download the the Mozilla CA certificate store in PEM format from https://curl.haxx.se/docs/caextract.html, save it as d:\cacert.pem. in Windows command prompt (cmd.exe),

run set SSL_CERT_FILE=d:/cacert.pem

then run cli_wallet -s wss://{ANY VALID AUTHORITY}/ws, for example,

cli_wallet -s wss://bitshares.openledger.info/ws

//Update: in Ubuntu, there is a default bundle file which openssl can find and use, so didn't have this issue.

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册