Curl --insecure / -k option

Hi guys,

I have recently migrated an application to HTTPS and now Libre’s transport is no longer working.
From checking the output from ./scripts/test-alert.php, I can see that it is a certificate issue:

ERROR: GuzzleHttp\Exception\RequestException: cURL error 60: Issuer certificate is invalid.

How can I import the self-signed certificate from the remote host or configure Libre to use curl with the --insecure option?

Thanks.

Found a workaround:
Update verify' => false, in /opt/librenms/vendor/guzzlehttp/guzzle/src/Client.php.
But would prefer a solution that affected only the transport. Does anyone know how I can overwrite this parameter in the API.php file?

Hello @mzacchi
It seems that you need to pass verify = false to the GuzzleClient instance:
new GuzzleClient(['verify' => false ]);
This means that you need to create a new “setting” in the API Transport, like a checkbox, and if checked, disable verification.
You can try to do this and submit a PR when done to let the community enjoy it as well.

Bye

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.