-
Notifications
You must be signed in to change notification settings - Fork 101
Description
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.loginThen we see the error, and the session ends. If we use nil instead of @trust_cert, we can login without any issues.