capi to use TLS and make -tls option actually work in minerlib

This commit is contained in:
cryptonote-social 2020-12-28 09:38:51 -08:00
parent d5e4d7aecf
commit 3fc4844855
2 changed files with 6 additions and 2 deletions

View File

@ -22,6 +22,7 @@ func PoolLogin(
Wallet: C.GoString(wallet),
Agent: C.GoString(agent),
Config: C.GoString(config),
UseTLS: true,
}
resp := minerlib.PoolLogin(args)
return resp.Code, C.CString(resp.Message)

View File

@ -207,8 +207,11 @@ func PoolLogin(args *PoolLoginArgs) *PoolLoginResponse {
agent := args.Agent
config := args.Config
rigid := args.RigID
err, code, message, jc := cl.Connect("cryptonote.social:5555", args.UseTLS, agent, loginName, config, rigid)
dest := "cryptonote.social:5555"
if args.UseTLS {
dest = "cryptonote.social:5556"
}
err, code, message, jc := cl.Connect(dest, args.UseTLS, agent, loginName, config, rigid)
if err != nil {
if code != 0 {
//crylog.Error("Pool server did not allow login due to error:")