Skip to content

OpenSSL certificate verify failed #320

@EyeOfGnut

Description

@EyeOfGnut

I am trying to use the trust_cert capability in the Connection object, but when I attempt to login I see the following error 5 times:
Retrying the request due to SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate). If you see this message please open an Issue on Github with the error.

I used the steps on the tutorial to get the PEM formatted certificate, which I store as a multi-line string in the ruby script. I do this, instead of storing it and loading it from a file, because we package the script with Ocra and need it to be a single file for portability.

We load the cert with the standard Connection.new constructor, and log in:

@nsc = Connection.new([IP], @account, @password, 3780, nil, nil, @trust_cert)
@nsc.login

Then we see the error, and the session ends. If we use nil instead of @trust_cert, we can login without any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions