Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do HTTPS request from Phoenix and ignore the CA error

I'm trying to call a dev environment REST service from my phoenix server, but I don't want to whitelist the CA. For the record, I don't even know how to add the CA key to Phoenix's whitelist.

How to do https request from phoenix while also ignoring the SSL's CA error?

like image 998
ardhitama Avatar asked Sep 24 '15 17:09

ardhitama


People also ask

How do I bypass a curl check certificate?

To bypass SSL certificate validation for local and test servers, you can pass the -k or --insecure option to the Curl command. This option explicitly tells Curl to perform "insecure" SSL connections and file transfers. Curl will ignore any security warnings about an invalid SSL certificate and accept it as valid.

What is insecure Skip verify?

InsecureSkipVerify means that there is NO authentication; and it's ripe for a Man-In-The-Middle; defeating the purpose of using TLS.

How do I disable SSL certificate verification in Python?

Output. We are easily getting a response from the above https URL, and it is because the request module can verify the SSL certificate. You can disable the SSL verification by simply adding verify=False as shown in the example below.


1 Answers

Using HTTPoison, you need to pass the :insecure hackney option.

HTTPoison.get! url, [], hackney: [:insecure]
like image 175
davoclavo Avatar answered Oct 15 '22 14:10

davoclavo