Full ubuntu 20.04 support - cli_wallet & openSSL
By default, Ubuntu 20.04 is not using openSSL 1.0 anymore - It is using v1.2, if we are offering full Ubuntu 20.04 support we must upgrade OpenSSL to work on 20.04 by default. The following error is outputted upon trying to connect to a running testnet - Note: The testnet is also running on 20.04
Logging RPC to file: logs/rpc/rpc.log
Starting a new wallet with chain ID 2c25aae5835fd54020329d4f150b04867e72cbd8f7f7b900a7c3da8a329a6014 (from CLI)
0 exception: unspecified
TLS handshake failed
{"message":"TLS handshake failed"}
asio websocket.cpp:436 operator()
{"uri":"wss://mint.peerplays.download/api"}
th_a websocket.cpp:662 secure_connect
{"uri":"wss://mint.peerplays.download/api"}
th_a websocket.cpp:635 connect
There is a workaround for 20.04 here with the following two sed commands:
sed -i '/^oid_section.*/a openssl_conf=default_conf' /etc/ssl/openssl.cnf
and
sed -i '/^ess_cert_id_alg.*/a\[default_conf]\nssl_conf=ssl_sect\n[ssl_sect]\nsystem_default=system_default_sect\n[system_default_sect]\nMinProtocol=TLSv1\nCipherString=DEFAULT@SECLEVEL=1' /etc/ssl/openssl.cnf
This forces 20.04 to have 1.0 support, but is not explained in the readme - As well as downgrading OpenSSL at the OS level is not recommended.
This is reproducible via the following:
- Install fresh Ubuntu 20.04, update completely.
- Install the dependencies for compiling to ensure not dependencies are missing
- Build or clone master OR develop branch
- Try connecting to a remote testnet node using the cli_wallet over secured websocket (WSS)
Example command for connecting from a remote system:
./cli_wallet -s wss://mint.peerplays.download/api --chain-id 2c25aae5835fd54020329d4f150b04867e72cbd8f7f7b900a7c3da8a329a6014