Skip to content

How to configure etcd ssl connection #213

@Hanoboo

Description

@Hanoboo

I tried to connect etcd with ssl certificate, but failed and reported an error.

  • code
local function connectEtcd()
    local conf = _M.conf
    local opt = {
        http_host = conf.etcd_endpoints,
        ssl_cert_path = conf.ssl_cert_path,
        ssl_key_path = conf.ssl_key_path,
        trusted_ca = conf.trusted_ca
    }
    local cli, err = etcd.new(opt)
    if not cli then
        return nil, err
    end
    return cli,nil
end
  • error
    SSL_do_handshake() failed (SSL: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate:SSL alert number 42)

  • question

Is the parameter trusted_ca the path to ca.pem to be passed in?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions