gearbox-solutions / eloquent-filemaker

A Model extension and Eloquent driver for Laravel connecting to FileMaker through the Data API
https://gearboxgo.com
MIT License
54 stars 16 forks source link

Self-Signed Certificate support #60

Closed wendelin closed 11 months ago

wendelin commented 11 months ago

Is there a way to enable to use (protocol=https) with Self-Signed Certificates?

As far as I can tell class GearboxSolutions\EloquentFileMaker\Services\FileMakerConnection method makeRequest would need to be altered to support setting the GuzzleHttp setting "verify" .

// Use a custom SSL certificate on disk.
$client->request('GET', '/', ['verify' => '/path/to/cert.pem']);

// Disable validation entirely (don't do this!).
$client->request('GET', '/', ['verify' => false]);

https://docs.guzzlephp.org/en/stable/request-options.html#verify

Smef commented 11 months ago

This package will work fine with self-signed certificates, but this is a configuration issue for your PHP server and not anything related to this package or any code you should be writing, really. You'll need to adjust your PHP config to either allow invalid certs (which is a bad idea) or added yourself or the signing authority as a trusted CA for your sever and for cURL in the trusted CA list..