The code is working fine on Ubuntu vagrant box, but on local MacOs it does not load sertificates saying
cURL error 58: SSL: Can\'t load the certificate \"..
installing curl via brew and with openssl support as outlined in the question is the correct approach. however you need to explicitly call it from its install dir /usr/local/opt/curl/bin/curl -v -k --key..
as brew wont link it to /usr/local as stated on install
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/curl/lib
CPPFLAGS: -I/usr/local/opt/curl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig