security – curl – Is data encrypted when using the –insecure option?
Yes, the transfered data is still sent encrypted.
--insecure will only make
curl skip certificate validation, it will not turn off SSL all together.
More information regarding the matter is available under the following link:
It will be encrypted but insecure. If you trust the certificate you should add the certificate to your certificate store instead of connecting insecurely.
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/new-root-certificate.crt
sudo cp foo.crt /usr/local/share/ca-certificates/foo.crt
yum install ca-certificates
cp foo.crt /etc/pki/ca-trust/source/anchors/
cat foo.crt >>/etc/pki/tls/certs/ca-bundle.crt
certutil -addstore -f ROOT new-root-certificate.crt